summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2023-11-09 11:59:51 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2023-11-10 11:51:05 -0500
commitb8eb4bd4ce509cc959695e1bd4890836708d8f29 (patch)
tree49dbd495031f1b8ab8554d09b69fe4cf7f1d7077 /yjit
parent38fe710e08db3d93b6225f9c41c18c672e602d7f (diff)
YJIT: Panic with more info when global invalidation patching fails
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/invariants.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/yjit/src/invariants.rs b/yjit/src/invariants.rs
index b03956c771..2c1d085872 100644
--- a/yjit/src/invariants.rs
+++ b/yjit/src/invariants.rs
@@ -531,7 +531,9 @@ pub extern "C" fn rb_yjit_tracing_invalidate_all() {
cb.set_write_ptr(patch.inline_patch_pos);
cb.set_dropped_bytes(false);
- asm.compile(cb, None).expect("can rewrite existing code");
+ if asm.compile(cb, None).is_none() {
+ panic!("Failed to apply patch at {:?}", patch.inline_patch_pos);
+ }
last_patch_end = cb.get_write_ptr().raw_ptr(cb);
}
cb.set_pos(old_pos);