]> sourceware.org Git - newlib-cygwin.git/commitdiff
Initialize context before RtlContextCapture
authorJon TURNEY <jon.turney@dronecode.org.uk>
Sat, 4 Apr 2015 15:19:31 +0000 (16:19 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 23 Apr 2015 19:58:32 +0000 (21:58 +0200)
* exceptions.cc (call_signal_handler): Zero initialize context and set
context flags, as RlCaptureContext doesn't.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
winsup/cygwin/ChangeLog
winsup/cygwin/exceptions.cc

index 50fc01ef9507ad594e3a0321918f23ac10755779..6d772c2fe200df96765763d45c5809a09d028e7d 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-04  Jon TURNEY  <jon.turney@dronecode.org.uk>
+
+       * exceptions.cc (call_signal_handler): Zero initialize context and set
+       context flags, as RlCaptureContext doesn't.
+
 2015-04-09  Corinna Vinschen  <corinna@vinschen.de>
 
        * fhandler_dsp.cc (fhandler_dev_dsp::open): Call open_null.
index 0d1f36d507a1760fa617089e1cb7602edc019e98..fe543aee4c8b7306f1118571d9faccc89e06e2e4 100644 (file)
@@ -1496,8 +1496,12 @@ _cygtls::call_signal_handler ()
       if (thissi.si_cyg)
         memcpy (&thiscontext.uc_mcontext, ((cygwin_exception *)thissi.si_cyg)->context(), sizeof(CONTEXT));
       else
-        RtlCaptureContext ((CONTEXT *)&thiscontext.uc_mcontext);
-        /* FIXME: Really this should be the context which the signal interrupted? */
+       {
+         /* FIXME: Really this should be the context which the signal interrupted? */
+         memset(&thiscontext.uc_mcontext, 0, sizeof(struct __mcontext));
+         thiscontext.uc_mcontext.ctxflags = CONTEXT_FULL;
+         RtlCaptureContext ((CONTEXT *)&thiscontext.uc_mcontext);
+       }
 
       /* FIXME: If/when sigaltstack is implemented, this will need to do
          something more complicated */
This page took 0.037533 seconds and 5 git commands to generate.