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