aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2007-08-09 17:20:09 +0000
committerChristopher Faylor <me@cgf.cx>2007-08-09 17:20:09 +0000
commita680a5325833f7ac5c4ee2b272a6f529192ead54 (patch)
tree228194ff6a802d63f7662c4e4d703f1f18928eb9 /winsup
parent7d5f6c188746c6682389cf8a7830d63fb3c9743b (diff)
downloadnewlib-a680a5325833f7ac5c4ee2b272a6f529192ead54.zip
newlib-a680a5325833f7ac5c4ee2b272a6f529192ead54.tar.gz
newlib-a680a5325833f7ac5c4ee2b272a6f529192ead54.tar.bz2
* gendef (sigbe): Reset "incyg" while the stack lock is active to avoid a
potential race.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rwxr-xr-xwinsup/cygwin/gendef2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5fca04d..0e08931 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-09 Ernie Coskrey <Ernie.Coskrey@steeleye.com>
+
+ * gendef (sigbe): Reset "incyg" while the stack lock is active to avoid
+ a potential race.
+
2007-08-09 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (rename): Close oldpath file handle immediately after
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
index 4f60ea6..0d7df4b 100755
--- a/winsup/cygwin/gendef
+++ b/winsup/cygwin/gendef
@@ -158,9 +158,9 @@ __sigbe: # return here after cygwin syscall
xorl %edx,%edx
xchgl %edx,-4(%eax) # get return address from signal stack
xchgl %edx,8(%esp) # restore edx/real return address
+ decl $tls::incyg(%ebx)
decl $tls::stacklock(%ebx) # release lock
popl %eax
- decl $tls::incyg(%ebx)
popl %ebx
ret