diff options
| author | Takashi Kokubun <takashi.kokubun@shopify.com> | 2025-07-10 18:12:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-10 18:12:29 -0700 |
| commit | 0e2bae82dc517d3252121d2090f4d00dcb1e70d2 (patch) | |
| tree | 605d2a206123c9a25ae96d3050437802935d75bb | |
| parent | 6c66458070e2de45213f473ac30b431ebea81b9b (diff) | |
ZJIT: Print a message about ZJIT_RB_BUG when unused (#13852)
| -rw-r--r-- | zjit/src/cruby.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zjit/src/cruby.rs b/zjit/src/cruby.rs index 459c7d7d5d..eba8af318f 100644 --- a/zjit/src/cruby.rs +++ b/zjit/src/cruby.rs @@ -860,6 +860,8 @@ pub fn rb_bug_panic_hook() { let panic_message = &format!("{}", panic_info)[..]; let len = std::cmp::min(0x100, panic_message.len()) as c_int; unsafe { rb_bug(b"ZJIT: %*s\0".as_ref().as_ptr() as *const c_char, len, panic_message.as_ptr()); } + } else { + eprintln!("note: run with `ZJIT_RB_BUG=1` environment variable to display a Ruby backtrace"); } })); } |
