https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=84395c9543290d1f0a0014e2327444d63bc6a00f

commit 84395c9543290d1f0a0014e2327444d63bc6a00f
Author:     Corinna Vinschen <[email protected]>
AuthorDate: Mon Mar 10 10:48:11 2025 +0100
Commit:     Corinna Vinschen <[email protected]>
CommitDate: Mon Mar 10 21:21:41 2025 +0100

    Cygwin: exceptions: drop setting ContextFlags when calling RtlCaptureContext
    
    RtlCaptureContext always returnes a CONTEXT_FULL type context anyway.
    
    Signed-off-by: Corinna Vinschen <[email protected]>

Diff:
---
 winsup/cygwin/exceptions.cc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 68c7af16ab80..6d8985374b9e 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1719,7 +1719,6 @@ _cygtls::call_signal_handler ()
              /* Software-generated signal.  We're fetching the current
                 context, unwind to the caller and in case we're called
                 from sigdelayed, fix the instruction pointer accordingly. */
-             context.uc_mcontext.ctxflags = CONTEXT_FULL;
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
              RtlCaptureContext ((PCONTEXT) &context.uc_mcontext);
@@ -1911,7 +1910,6 @@ extern "C" int
 getcontext (ucontext_t *ucp)
 {
   PCONTEXT ctx = (PCONTEXT) &ucp->uc_mcontext;
-  ctx->ContextFlags = CONTEXT_FULL;
   RtlCaptureContext (ctx);
   __unwind_single_frame (ctx);
   /* Successful getcontext is supposed to return 0.  If we don't set the

Reply via email to