From: John David Anglin Date: Mon, 28 Feb 2022 15:47:38 +0000 (+0000) Subject: nptl: Fix cleanups for stack grows up [BZ# 28899] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d9525b620eac4cbdf790baf4776e85cf08df7c5;p=thirdparty%2Fglibc.git nptl: Fix cleanups for stack grows up [BZ# 28899] _STACK_GROWS_DOWN is defined to 0 when the stack grows up. The code in unwind.c used `#ifdef _STACK_GROWS_DOWN' to selct the stack grows down define for FRAME_LEFT. As a result, the _STACK_GROWS_DOWN define was always selected and cleanups were incorrectly sequenced when the stack grows up. (cherry picked from commit 2bbc694df279020a6620096d31c1e05c93966f9b) --- diff --git a/nptl/unwind.c b/nptl/unwind.c index 9c7ed7d7ca0..0a2ec9b8bb1 100644 --- a/nptl/unwind.c +++ b/nptl/unwind.c @@ -26,7 +26,7 @@ #include #include -#ifdef _STACK_GROWS_DOWN +#if _STACK_GROWS_DOWN # define FRAME_LEFT(frame, other, adj) \ ((uintptr_t) frame - adj >= (uintptr_t) other - adj) #elif _STACK_GROWS_UP