From 8f14518191893837d93bf723703e2ad207ee817e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 21 May 2021 15:33:19 -0700 Subject: [PATCH 2/2] sigsegv: do not guarantee SIGSTKSZ is constant glibc no longer guarantees that SIGSTKSZ is a constant, and it appears that few programs still need it to be a constant. * NEWS: Mention this. * lib/sigsegv.in.h (SIGSTKSZ) [__GLIBC__ >= 2]: Do not redefine. --- ChangeLog | 6 ++++++ NEWS | 3 +++ lib/sigsegv.in.h | 11 +---------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50e376176..843b2e267 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2021-05-21 Paul Eggert + sigsegv: do not guarantee SIGSTKSZ is constant + glibc no longer guarantees that SIGSTKSZ is a constant, + and it appears that few programs still need it to be a constant. + * NEWS: Mention this. + * lib/sigsegv.in.h (SIGSTKSZ) [__GLIBC__ >= 2]: Do not redefine. + sigsegv: don’t assume SIGSTKSZ is a constant * m4/sigaltstack.m4 (SV_SIGALTSTACK): Don’t attempt to override SIGSTKSZ. Instead, use an array that is plenty large, while diff --git a/NEWS b/NEWS index 98931a345..e02ebf42e 100644 --- a/NEWS +++ b/NEWS @@ -60,6 +60,9 @@ User visible incompatible changes Date Modules Changes +2021-05-21 sigsegv sigsegv.h no longer guarantees that SIGSTKSZ + is an integer constant expression. + 2021-03-21 fatal-signal The function at_fatal_signal now returns an error indicator. diff --git a/lib/sigsegv.in.h b/lib/sigsegv.in.h index e442f4dfa..e5fac651b 100644 --- a/lib/sigsegv.in.h +++ b/lib/sigsegv.in.h @@ -37,20 +37,11 @@ #endif /* Correct the value of SIGSTKSZ on some systems. - glibc >= 2.34: When _GNU_SOURCE is defined, SIGSTKSZ is no longer a - compile-time constant. But most programs need a simple constant. AIX 64-bit: original value 4096 is too small. HP-UX: original value 8192 is too small. Solaris 11/x86_64: original value 8192 is too small. */ + #include -#if __GLIBC__ >= 2 -# undef SIGSTKSZ -# if defined __ia64__ -# define SIGSTKSZ 262144 -# else -# define SIGSTKSZ 65536 -# endif -#endif #if defined _AIX && defined _ARCH_PPC64 # undef SIGSTKSZ # define SIGSTKSZ 8192 -- 2.27.0