This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]