]> sourceware.org Git - glibc.git/commitdiff
Fix usage of _STACK_GROWS_DOWN and _STACK_GROWS_UP defines [BZ 31989]
authorJohn David Anglin <danglin@gcc.gnu.org>
Fri, 19 Jul 2024 14:10:17 +0000 (10:10 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 19 Jul 2024 14:10:17 +0000 (10:10 -0400)
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Reviewed-By: Andreas K. Hüttel <dilfridge@gentoo.org>
malloc/memusage.c
stdlib/tst-swapcontext2.c
sysdeps/unix/sysv/linux/____longjmp_chk.c

index e8ae80dc74af4585cbb2eb485ed9f95948b49f53..f80225b95a36707b7b910eedc3dbc7bc096ed8e8 100644 (file)
@@ -172,7 +172,7 @@ update_data (struct header *result, size_t len, size_t old_len)
     start_sp = __thread_stack_pointer ();
 
   uintptr_t sp = __thread_stack_pointer ();
-#ifdef _STACK_GROWS_UP
+#if _STACK_GROWS_UP
   /* This can happen in threads where we didn't catch the thread's
      stack early enough.  */
   if (__glibc_unlikely (sp < start_sp))
index f679755649809653561d3bf7400da9887c896923..a9c1dc827cb897f3492dd0b6d33334ac8dce848f 100644 (file)
@@ -85,7 +85,7 @@ do_test (void)
 {
   /* ____longjmp_chk has  */
 #if 0
-#ifdef _STACK_GROWS_DOWN
+#if _STACK_GROWS_DOWN
 #define called_from(this, saved) ((this) < (saved))
 #else
 #define called_from(this, saved) ((this) > (saved))
@@ -98,7 +98,7 @@ do_test (void)
   /* Arrange stacks for uctx_func1 and uctx_func2 so that called_from
      is true when setjmp is called from uctx_func1 and longjmp is called
      from uctx_func2.  */
-#ifdef _STACK_GROWS_DOWN
+#if _STACK_GROWS_DOWN
 # define UCTX_FUNC1_STACK      1
 # define UCTX_FUNC2_STACK      0
 #else
index 0896dc5755dfa1dbf9b4096e059781c802db68a7..3c66a4638eedbbea3214b919b5f26d83e3027eaa 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include <stackinfo.h>
 
-#ifdef _STACK_GROWS_DOWN
+#if _STACK_GROWS_DOWN
 #define called_from(this, saved) ((this) < (saved))
 #else
 #define called_from(this, saved) ((this) > (saved))
This page took 0.047644 seconds and 5 git commands to generate.