Patch by Paul Eggert.
* tests/test-sigsegv-catch-stackoverflow2.c
(null_pointer_to_volatile_int): New variable.
(main): Use it.
+2021-06-09 Bruno Haible <bruno@clisp.org>
+
+ sigsegv tests: Hide a null pointer from the compiler's optimizations.
+ Patch by Paul Eggert.
+ * tests/test-sigsegv-catch-stackoverflow2.c
+ (null_pointer_to_volatile_int): New variable.
+ (main): Use it.
+
2021-06-07 Bruno Haible <bruno@clisp.org>
get_ppid_of: Add support for DragonFly BSD.
volatile int pass = 0;
uintptr_t page;
+volatile int *null_pointer_to_volatile_int /* = NULL */;
static void
stackoverflow_handler_continuation (void *arg1, void *arg2, void *arg3)
*(volatile int *) (page + 0x678) = 42;
break;
case 3:
- *(volatile int *) 0 = 42;
+ *null_pointer_to_volatile_int = 42;
break;
case 4:
break;