The new Arthur "two queues" Jackson* implementation of signals

Christopher Faylor cgf@redhat.com
Fri Aug 22 20:11:00 GMT 2003


On Fri, Aug 22, 2003 at 03:54:44PM -0400, Pierre A. Humblet wrote:
>>I'm not sure why clobbering ebp should have any effect on a subsequent
>>program since AFAICT, it should eventually be restored correctly when
>>the (nested) signal handler returns.  However, it does seem to cause
>>problems.
>
>Yes, "old ebp" is eventually restored.  But the crash happens during
>the call to set_process_mask (during termination), which saves the
>(incorrect) ebp on the stack.  When an interrupt is pending the
>sigthread walks the stack and expects the ebp's on the stack to point
>next to a return address.  So ebp must be correct when set_process_mask
>is called.

Ah, of course.  This is what you said in your email.

>>For the curious, I've included my test case below.
>
>No time now...  You need 3 interrupts to have 2 recursions and
>demonstrate the problem.

The test case (now) does ten recursions.

cgf



More information about the Cygwin-developers mailing list