GCC 14 on x86-64 with -O2 apparently outsmarts our test for null
pointer dereference, and this is something the C standard allows.
Fix the test by putting ‘volatile’ at the right place.
* tests/test-sigsegv-catch-stackoverflow2.c (null_pointer):
Make it a volatile pointer, not a pointer to volatile.
Also, rename from null_pointer_to_volatile_int; use changed.
+2024-09-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ sigsegv-tests: port to GCC 14
+ GCC 14 on x86-64 with -O2 apparently outsmarts our test for null
+ pointer dereference, and this is something the C standard allows.
+ Fix the test by putting ‘volatile’ at the right place.
+ * tests/test-sigsegv-catch-stackoverflow2.c (null_pointer):
+ Make it a volatile pointer, not a pointer to volatile.
+ Also, rename from null_pointer_to_volatile_int; use changed.
+
2024-09-20 Bruno Haible <bruno@clisp.org>
jit/cache tests: Fix crash with clang's UBSAN + ASAN.
static volatile int pass = 0;
static uintptr_t page;
-static volatile int *null_pointer_to_volatile_int /* = NULL */;
+static int *volatile null_pointer /* = NULL */;
static void
stackoverflow_handler_continuation (void *arg1, void *arg2, void *arg3)
*(volatile int *) (page + 0x678) = 42;
break;
case 3:
- *null_pointer_to_volatile_int = 42;
+ *null_pointer = 42;
break;
case 4:
break;