* exceptions.cc (sigreturn): Fix problem where old return address was not

properly restored for a nested signal.
This commit is contained in:
Christopher Faylor 2003-08-29 02:05:00 +00:00
parent 723b87cd5c
commit 5e8355c765
3 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2003-08-28 Christopher Faylor <cgf@redhat.com>
* exceptions.cc (sigreturn): Fix problem where old return address was
not properly restored for a nested signal.
2003-08-27 Christopher Faylor <cgf@redhat.com> 2003-08-27 Christopher Faylor <cgf@redhat.com>
* autoload.cc (SwitchToThread): Declare as autoload function. * autoload.cc (SwitchToThread): Declare as autoload function.

View File

@ -1219,7 +1219,9 @@ _sigreturn: \n\
cmpl $0,%4 # Did a signal come in? \n\ cmpl $0,%4 # Did a signal come in? \n\
jz 1f # No, if zero \n\ jz 1f # No, if zero \n\
movl %2,%%eax \n\ movl %2,%%eax \n\
movl %%eax,36(%%esp) # Restore return address \n\ movl %8,%%ebx # Where return address lives \n\
movl %%eax,(%%ebx) # Restore return address of \n\
# most recent caller \n\
jmp 3f \n\ jmp 3f \n\
\n\ \n\
1: popl %%eax # saved errno \n\ 1: popl %%eax # saved errno \n\
@ -1266,10 +1268,10 @@ _sigdelayed0: \n\
popl %%eax \n\ popl %%eax \n\
jmp *%%eax \n\ jmp *%%eax \n\
__no_sig_end: \n\ __no_sig_end: \n\
" : "=m" (sigsave.sig): "X" ((char *) &_impure_ptr->_errno), " : "=m" (sigsave.sig)/*0*/: "X" ((char *) &_impure_ptr->_errno)/*1*/,
"g" (sigsave.retaddr), "g" (sigsave.oldmask), "g" (sigsave.sig), "g" (sigsave.retaddr)/*2*/, "g" (sigsave.oldmask)/*3*/, "g" (sigsave.sig)/*4*/,
"g" (sigsave.func), "g" (sigsave.saved_errno), "g" (sigsave.newmask), "g" (sigsave.func)/*5*/, "g" (sigsave.saved_errno)/*6*/, "g" (sigsave.newmask)/*7*/,
"g" (sigsave.retaddr_on_stack) "g" (sigsave.retaddr_on_stack)/*8*/
); );
} }
} }

View File

@ -1157,7 +1157,7 @@ wait_sig (VOID *self)
sigproc_printf ("awake, rc %d", rc); sigproc_printf ("awake, rc %d", rc);
LONG *todo; LONG *todo;
if (rc != RC_NOSYNC) if (rc != RC_NOSYNC)
todo = *todos; todo = todos[0];
else else
todo = todos[1]; todo = todos[1];