diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-09-12 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-09-12 08:00:00 +0000 |
commit | 8077af8188288f172a7548f5bc213697232f852d (patch) | |
tree | 7d40de790f857176e89be48b44ce6221466ceefe | |
parent | b0a338638071be6916b0f509c071eb9a425bac0e (diff) | |
download | strace-8077af8188288f172a7548f5bc213697232f852d.tar.gz |
tests/ipc_msg.c: disable TEST_MSGCTL_BOGUS_ADDR on glibc >= 2.32
Starting with commit glibc-2.32~83, on every 32-bit architecture where
32-bit time_t support is enabled, glibc tries to retrieve the data
provided in the third argument of msgctl call. This results to
segfaults inside glibc if TEST_MSGCTL_BOGUS_ADDR is enabled.
* tests/ipc_msg.c [GLIBC_PREREQ_GE(2, 32) && __TIMESIZE != 64]
(TEST_MSGCTL_BOGUS_ADDR): Define to 0.
Reported-by: Ruinland ChuanTzu Tsai <ruinland@andestech.com>
-rw-r--r-- | tests/ipc_msg.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/ipc_msg.c b/tests/ipc_msg.c index 5c34aabcb..479256a1a 100644 --- a/tests/ipc_msg.c +++ b/tests/ipc_msg.c @@ -20,12 +20,21 @@ # define MSG_STAT_ANY 13 #endif +#undef TEST_MSGCTL_BOGUS_ADDR + +/* + * Starting with commit glibc-2.32~83, on every 32-bit architecture + * where 32-bit time_t support is enabled, glibc tries to retrieve + * the data provided in the third argument of msgctl call. + */ +#if GLIBC_PREREQ_GE(2, 32) && defined __TIMESIZE && __TIMESIZE != 64 +# define TEST_MSGCTL_BOGUS_ADDR 0 +#endif /* * Before glibc-2.22-122-gbe48165, ppc64 code tried to retrieve data * provided in third argument of msgctl call (in case of IPC_SET cmd) * which led to segmentation fault. */ -#undef TEST_MSGCTL_BOGUS_ADDR #if GLIBC_PREREQ_LT(2, 23) && (defined POWERPC64 || defined POWERPC64LE) # define TEST_MSGCTL_BOGUS_ADDR 0 #endif |