08c3a6
commit 40fc6a74ee3dd600c84d311d91cbb16962f11a71
08c3a6
Author: John David Anglin <danglin@gcc.gnu.org>
08c3a6
Date:   Mon Feb 28 15:47:38 2022 +0000
08c3a6
08c3a6
    nptl: Fix cleanups for stack grows up [BZ# 28899]
08c3a6
    
08c3a6
    _STACK_GROWS_DOWN is defined to 0 when the stack grows up.  The
08c3a6
    code in unwind.c used `#ifdef _STACK_GROWS_DOWN' to selct the
08c3a6
    stack grows down define for FRAME_LEFT.  As a result, the
08c3a6
    _STACK_GROWS_DOWN define was always selected and cleanups were
08c3a6
    incorrectly sequenced when the stack grows up.
08c3a6
    
08c3a6
    (cherry picked from commit 2bbc694df279020a6620096d31c1e05c93966f9b)
08c3a6
08c3a6
diff --git a/nptl/unwind.c b/nptl/unwind.c
08c3a6
index f50997f728ccde0d..404fab46d00e9f10 100644
08c3a6
--- a/nptl/unwind.c
08c3a6
+++ b/nptl/unwind.c
08c3a6
@@ -27,7 +27,7 @@
08c3a6
 #include <jmpbuf-unwind.h>
08c3a6
 #include <shlib-compat.h>
08c3a6
 
08c3a6
-#ifdef _STACK_GROWS_DOWN
08c3a6
+#if _STACK_GROWS_DOWN
08c3a6
 # define FRAME_LEFT(frame, other, adj) \
08c3a6
   ((uintptr_t) frame - adj >= (uintptr_t) other - adj)
08c3a6
 #elif _STACK_GROWS_UP