diff options
author | Peter Zhu <[email protected]> | 2024-12-20 14:09:19 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-12-20 15:04:08 -0500 |
commit | 97f55466760d89a54e82608e5c7c31fba60158ca (patch) | |
tree | 0a2410102bcc933dd36c3b4ff6629e472a3ee0b8 | |
parent | aa360c3bee359f456d2f72dfa1bc9767074587ae (diff) |
Don't print bug report in asan_death_callback when no VM
If we don't have the VM (e.g. printing memory leaks in LSAN after shutdown)
then we will crash when we try to print the bug report. This issue was
reported in: https://github.com/ruby/ruby/pull/12309#issuecomment-2555766525
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12413
-rw-r--r-- | gc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -940,7 +940,9 @@ ruby_modular_gc_init(void) static void asan_death_callback(void) { - rb_bug_without_die("ASAN error"); + if (GET_VM()) { + rb_bug_without_die("ASAN error"); + } } #endif |