mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 21:40:12 +00:00
Fix usage of _STACK_GROWS_DOWN and _STACK_GROWS_UP defines [BZ 31989]
Signed-off-by: John David Anglin <dave.anglin@bell.net> Reviewed-By: Andreas K. Hüttel <dilfridge@gentoo.org>
This commit is contained in:
parent
91eb62d638
commit
8cfa4ecff2
@ -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))
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user