]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Darwin regtest: small change for memcheck descr_belowsp
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 19 Mar 2026 19:05:18 +0000 (20:05 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 19 Mar 2026 19:07:30 +0000 (20:07 +0100)
On Darwin reading below the bottom of the allowed stack produces a SIGBUS
not a SIGSEGV. So handle that as well.

The test still fails as the macOS describe mechanism is very different,
relying on OS vm functions.

memcheck/tests/descr_belowsp.c

index 4b429d36aeadb58aff9d427ccde39254a0e6958f..ea82e15ea8f1bfc97d888e611e03d8f6e5eb11b8 100644 (file)
@@ -160,6 +160,10 @@ int main(int argc, const char** argv)
 
    if (sigaction (SIGSEGV, &sa, NULL) != 0)
       perror("sigaction");
+#if defined(__APPLE__)
+   if (sigaction (SIGBUS, &sa, NULL) != 0)
+      perror("sigaction");
+#endif
 
    grow_the_stack();
    bad_things_below_sp();