diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-05-10 19:31:19 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-05-10 19:31:19 +0300 |
commit | db76b2f831a66c8067626dd6bb68450243989bf3 (patch) | |
tree | c716f7438e5a671d1a68a25531ff169f9bea7a2b | |
parent | 7bbc09531f091680c58dc6974af31a65feabbc2d (diff) | |
download | bdwgc-db76b2f831a66c8067626dd6bb68450243989bf3.tar.gz |
Improve ABORT message in GC_darwin_sigbus
* os_dep.c [MPROTECT_VDB && DARWIN && BROKEN_EXCEPTION_HANDLING]
(GC_darwin_sigbus): Refine ABORT message.
* os_dep.c [MPROTECT_VDB && DARWIN && BROKEN_EXCEPTION_HANDLING]
(GC_dirty_init): Refine comment ("SIGBUS signals").
-rw-r--r-- | os_dep.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -4654,12 +4654,10 @@ STATIC void *GC_mprotect_thread(void *arg) /* Ugh... some seem safe to ignore, but too many in a row probably means trouble. GC_sigbus_count is reset for each mach exception that is handled */ - if (GC_sigbus_count >= 8) { - ABORT("Got more than 8 SIGBUSs in a row!"); - } else { - GC_sigbus_count++; - WARN("Ignoring SIGBUS\n", 0); - } + if (GC_sigbus_count >= 8) + ABORT("Got many SIGBUS signals in a row!"); + GC_sigbus_count++; + WARN("Ignoring SIGBUS\n", 0); } #endif /* BROKEN_EXCEPTION_HANDLING */ @@ -4739,7 +4737,7 @@ GC_INNER GC_bool GC_dirty_init(void) ABORT("pthread_create failed"); (void)pthread_attr_destroy(&attr); - /* Setup the sigbus handler for ignoring the meaningless SIGBUSs */ + /* Setup the sigbus handler for ignoring the meaningless SIGBUS signals. */ # ifdef BROKEN_EXCEPTION_HANDLING { struct sigaction sa, oldsa; @@ -4942,7 +4940,7 @@ catch_exception_raise(mach_port_t exception_port, mach_port_t thread, } # ifdef BROKEN_EXCEPTION_HANDLING - /* Reset the number of consecutive SIGBUSs */ + /* Reset the number of consecutive SIGBUS signals. */ GC_sigbus_count = 0; # endif |