Peter Wang
7647cba072
Don't use __builtin_setjmp, __builtin_longjmp on AArch64 with older GCCs.
...
There is an issue on Linux/aarch64 with older versions of gcc where a
commit performed on a thread using the gcc __builtin_longjmp function
causes an assertion failure in pthread_create() if the Mercury runtime
is dynamically linked:
pthread_create.c:430: start_thread: Assertion `freesize < pd->stackblock_size' failed.
or a crash if the Mercury runtime is statically linked:
*** Mercury runtime: caught segmentation violation ***
cause: address not mapped to object
The gcc versions tested are:
BAD - gcc version 6.3.0 20170516 (Debian 6.3.0-18) from Debian 9
BAD - gcc version 8.3.0 (Debian 8.3.0-2) from Debian 10
OK - gcc version 10.2.1 20210110 (Debian 10.2.1-6) from Debian 11
on Debian with glibc.
runtime/mercury.h:
Define MR_USE_GCC_BUILTIN_SETJMP_LONGJMP if we decide to use gcc's
__builtin_setjmp and __builtin_longjmp functions instead of the
standard functions.
Use standard setjmp/longjmp on aarch64 if gcc version is < 10.
Update the comment for MR_builtin_jmp_buf to refer to the GCC manual
instead of the GCC source code. Use an array of 'intptr_t's instead
of 'void *'s, to match the manual.
tests/hard_coded/Mmakefile
tests/hard_coded/thread_commit.m:
tests/hard_coded/thread_commit.exp:
tests/hard_coded/thread_commit.exp2:
Add test case.
2022-05-26 22:47:58 +10:00
..
2021-01-13 15:24:23 +11:00
2018-08-02 14:45:42 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2021-04-13 11:28:18 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2021-06-06 19:07:20 +10:00
2018-06-09 17:43:12 +10:00
2020-07-24 17:14:07 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2020-10-13 13:32:32 +11:00
2021-09-28 01:12:03 +10:00
2021-04-09 17:41:23 +10:00
2021-04-09 17:36:38 +10:00
2021-01-23 19:41:51 +11:00
2020-10-25 14:45:35 +11:00
2018-07-23 10:26:29 +10:00
2018-06-09 17:43:12 +10:00
2021-04-09 17:41:23 +10:00
2021-04-09 17:41:23 +10:00
2018-08-30 05:14:38 +10:00
2018-06-09 17:43:12 +10:00
2021-04-09 17:41:23 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2019-10-08 21:36:11 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-10-09 05:27:36 +00:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2019-10-08 21:36:11 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2019-06-10 13:30:49 +10:00
2019-06-10 13:30:49 +10:00
2019-06-10 13:30:49 +10:00
2021-05-10 15:21:04 +10:00
2018-06-09 17:43:12 +10:00
2021-06-14 16:50:37 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-08-10 14:47:20 +10:00
2018-06-09 17:43:12 +10:00
2019-06-08 16:40:24 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2020-04-11 19:30:58 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2020-04-28 10:55:18 +10:00
2020-04-28 10:55:18 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2020-10-13 13:32:32 +11:00
2018-06-09 17:43:12 +10:00
2018-08-19 12:19:19 +10:00
2018-08-19 12:19:19 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-10-09 05:27:36 +00:00
2018-06-09 17:43:12 +10:00
2018-08-19 12:19:19 +10:00
2018-06-09 17:43:12 +10:00
2018-08-30 05:14:38 +10:00
2018-08-30 05:14:38 +10:00
2021-11-04 01:29:41 +11:00
2018-08-30 05:14:38 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-08-19 12:19:19 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-09-11 10:55:30 +10:00
2018-09-11 10:55:30 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2021-01-13 14:22:21 +11:00
2021-11-30 11:15:06 +11:00
2021-04-05 16:35:44 +10:00
2018-07-23 10:26:29 +10:00
2018-06-09 17:43:12 +10:00
2020-10-13 13:32:32 +11:00
2020-10-13 13:32:32 +11:00
2018-07-23 10:26:29 +10:00
2020-07-24 17:14:07 +10:00
2018-08-19 12:19:19 +10:00
2018-06-09 17:43:12 +10:00
2018-07-23 10:26:29 +10:00
2018-06-09 17:43:12 +10:00
2021-02-14 20:30:08 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2019-09-13 15:51:02 +10:00
2021-11-04 00:46:05 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-08-30 05:14:38 +10:00
2018-06-09 17:43:12 +10:00
2020-04-28 13:36:58 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-08-19 12:19:19 +10:00
2018-06-09 17:43:12 +10:00
2018-10-09 05:27:36 +00:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-11-29 06:01:42 +00:00
2018-07-23 10:26:29 +10:00
2018-06-09 17:43:12 +10:00
2020-01-17 17:09:49 +11:00
2018-06-09 17:43:12 +10:00
2020-02-18 13:07:24 +11:00
2020-02-18 13:07:24 +11:00
2018-06-09 17:43:12 +10:00
2022-01-01 15:53:34 +11:00
2018-08-30 05:14:38 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2022-01-31 20:36:53 +11:00
2022-01-31 20:36:53 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2020-03-15 17:05:47 +11:00
2022-05-26 22:47:58 +10:00
2021-03-21 17:30:53 +11:00
2019-06-10 13:30:49 +10:00
2020-10-13 13:32:32 +11:00