From a680a5325833f7ac5c4ee2b272a6f529192ead54 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 9 Aug 2007 17:20:09 +0000 Subject: [PATCH] * gendef (sigbe): Reset "incyg" while the stack lock is active to avoid a potential race. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/gendef | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5fca04dea..0e089319e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2007-08-09 Ernie Coskrey + + * gendef (sigbe): Reset "incyg" while the stack lock is active to avoid + a potential race. + 2007-08-09 Corinna Vinschen * syscalls.cc (rename): Close oldpath file handle immediately after diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index 4f60ea686..0d7df4b09 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 -- 2.43.5