Skip to content

Commit

Permalink
YJIT: Panic with more info when global invalidation patching fails
Browse files Browse the repository at this point in the history
  • Loading branch information
XrXr committed Nov 10, 2023
1 parent c2ad04f commit 418e0a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yjit/src/invariants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 418e0a0

Please sign in to comment.