Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-08-29 06:05:00 +0400
committerChristopher Faylor <me@cgf.cx>2003-08-29 06:05:00 +0400
commit5e8355c765038b2ce608fa00eeebc900de12ddb1 (patch)
tree0e886f40ea6b98f573e414d56180fa8d9817eed7 /winsup/cygwin
parent723b87cd5cad158a20c39349720e405635d2fd41 (diff)
* exceptions.cc (sigreturn): Fix problem where old return address was not
properly restored for a nested signal.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/exceptions.cc12
-rw-r--r--winsup/cygwin/sigproc.cc2
3 files changed, 13 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 136869860..fee1bc267 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
* autoload.cc (SwitchToThread): Declare as autoload function.
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index ae2c400a6..075b3cc92 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1219,7 +1219,9 @@ _sigreturn: \n\
cmpl $0,%4 # Did a signal come in? \n\
jz 1f # No, if zero \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\
\n\
1: popl %%eax # saved errno \n\
@@ -1266,10 +1268,10 @@ _sigdelayed0: \n\
popl %%eax \n\
jmp *%%eax \n\
__no_sig_end: \n\
-" : "=m" (sigsave.sig): "X" ((char *) &_impure_ptr->_errno),
- "g" (sigsave.retaddr), "g" (sigsave.oldmask), "g" (sigsave.sig),
- "g" (sigsave.func), "g" (sigsave.saved_errno), "g" (sigsave.newmask),
- "g" (sigsave.retaddr_on_stack)
+" : "=m" (sigsave.sig)/*0*/: "X" ((char *) &_impure_ptr->_errno)/*1*/,
+ "g" (sigsave.retaddr)/*2*/, "g" (sigsave.oldmask)/*3*/, "g" (sigsave.sig)/*4*/,
+ "g" (sigsave.func)/*5*/, "g" (sigsave.saved_errno)/*6*/, "g" (sigsave.newmask)/*7*/,
+ "g" (sigsave.retaddr_on_stack)/*8*/
);
}
}
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 4d2ce8070..60c26072d 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1157,7 +1157,7 @@ wait_sig (VOID *self)
sigproc_printf ("awake, rc %d", rc);
LONG *todo;
if (rc != RC_NOSYNC)
- todo = *todos;
+ todo = todos[0];
else
todo = todos[1];