aboutsummaryrefslogtreecommitdiff
path: root/support/support_stack_alloc.c
AgeCommit message (Collapse)AuthorFilesLines
2021-07-11support: Replace _SC_MINSIGSTKSZ with _SC_SIGSTKSZH.J. Lu1-2/+2
Replace _SC_MINSIGSTKSZ with _SC_SIGSTKSZ since sysconf (_SC_MINSIGSTKSZ) returns the minimum number of bytes of free stack space required in order to guarantee successful, non-nested handling of a single signal whose handler is an empty function while sysconf (_SC_SIGSTKSZ) returns the suggested minimum number of bytes of stack space required for a signal stack. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-07-09support: Replace MINSIGSTKSZ with sysconf (_SC_MINSIGSTKSZ)H.J. Lu1-4/+5
Replace MINSIGSTKSZ with sysconf (_SC_MINSIGSTKSZ) since the constant MINSIGSTKSZ used in glibc build may be too small. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-07-08support: Add support_stack_allocAdhemerval Zanella1-0/+82
The code to allocate a stack from xsigstack is refactored so it can be more generic. The new support_stack_alloc() also set PROT_EXEC if DEFAULT_STACK_PERMS has PF_X. This is required on some architectures (hppa for instance) and trying to access the rtld global from testsuite will require more intrusive refactoring in the ldsodefs.h header. Checked on x86_64-linux-gnu and i686-linux-gnu. I also ran tst-xsigstack on both hppa and ia64.