# HG changeset patch # User Tassilo Philipp # Date 1609160949 -3600 # Node ID 51af8ec8d8e6e2ec8bb7bb3ed29713bcc757445e # Parent 041cb6ad4d50ac1572af699d75fa53a6fa79e43d - simplified thunk-test memory error handling (sigaction setup not needed for this single-threaded test; did also set mutually exclusive union members) diff -r 041cb6ad4d50 -r 51af8ec8d8e6 test/thunk/test_thunk.c --- a/test/thunk/test_thunk.c Mon Dec 28 14:04:32 2020 +0100 +++ b/test/thunk/test_thunk.c Mon Dec 28 14:09:09 2020 +0100 @@ -116,19 +116,9 @@ { dcTest_initPlatform(); -#if defined(DC__OS_MacOSX) - /* Memory access errors can result into SIGBUS */ - signal(SIGBUS, segv_handler); - - struct sigaction sigAct; - sigfillset(&(sigAct.sa_mask)); - sigAct.sa_sigaction = segv_handler; - /* we need to enable SA_ONSTACK which allows faulting on the stack */ - sigAct.sa_flags = SA_SIGINFO|SA_RESTART|SA_ONSTACK; - sigaction(SIGSEGV, &sigAct, NULL); -#else + /* handle possible mem access errors */ + signal(SIGBUS, segv_handler); signal(SIGSEGV, segv_handler); -#endif printf("Allocating ...\n"); printf("... W^X memory: ");