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>2011-07-06 22:44:06 +0400
committerChristopher Faylor <me@cgf.cx>2011-07-06 22:44:06 +0400
commit57e64035f8426c86dd211c5246bbde426deb6a09 (patch)
tree2951bf6e41c5b109eef724be3120b221face71fa /winsup/cygwin
parent5e6a91549e926011462d669215088f445272273b (diff)
* exceptions.cc (_cygtls::interrupt_now): Back out previous change since it
could theoretically cause a non-CTRL-C-able program if a program has suffered memory corruption. (setup_handler): Ditto.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/exceptions.cc14
2 files changed, 11 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index a8131c004..397436469 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2011-07-06 Christopher Faylor <me.cygwin2011@cgf.cx>
+
+ * exceptions.cc (_cygtls::interrupt_now): Back out previous change
+ since it could theoretically cause a non-CTRL-C-able program if a
+ program has suffered memory corruption.
+ (setup_handler): Ditto.
+
2011-07-06 Corinna Vinschen <corinna@vinschen.de>
* sched.c (sched_yield): Just call SwitchToThread because yield now
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 9db7f4131..638c6e3b8 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -777,8 +777,9 @@ _cygtls::interrupt_now (CONTEXT *cx, int sig, void *handler,
/* Delay the interrupt if we are
1) somehow inside the DLL
- 2) in a Windows DLL. */
- if (incyg ||inside_kernel (cx))
+ 2) in _sigfe (spinning is true) and about to enter cygwin DLL
+ 3) in a Windows DLL. */
+ if (incyg || spinning || inside_kernel (cx))
interrupted = false;
else
{
@@ -882,15 +883,8 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _cygtls *tls)
cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
if (!GetThreadContext (hth, &cx))
system_printf ("couldn't get context of thread, %E");
- else if (!tls->spinning)
- interrupted = tls->interrupt_now (&cx, sig, handler, siga);
else
- {
- /* We should be out of this state very soon so force a retry
- without incrementing loop counter. */
- i--;
- interrupted = false;
- }
+ interrupted = tls->interrupt_now (&cx, sig, handler, siga);
tls->unlock ();
res = ResumeThread (hth);