summaryrefslogtreecommitdiff
path: root/include/ruby/debug.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2025-11-23 17:34:44 -0500
committerPeter Zhu <peter@peterzhu.ca>2025-11-24 14:32:53 -0800
commit2315349b8ac10b1b4468ed10dabcb348a10bca0a (patch)
treea21ace1c94986a757518ffc5fa4e84b051203db6 /include/ruby/debug.h
parent8a68dc7bdd3d1c97677a6633a4f2b5e524c492ae (diff)
Handle SIGABRT and output bug report
SIGABRT is for abnormal termination so we should handle it to output a bug report. Specifically, glibc malloc uses it to exit when there is corruption. For example, the following script produces a double free: mem = Fiddle.malloc(10) Fiddle.free(mem) Fiddle.free(mem) Before this patch, it just outputs the following and exits: free(): double free detected in tcache 2 After this patch, it also outputs a bug report: free(): double free detected in tcache 2 test.rb:11: [BUG] Aborted at 0x000003e8000ab65c
Diffstat (limited to 'include/ruby/debug.h')
0 files changed, 0 insertions, 0 deletions