diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2023-11-07 17:46:24 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2023-11-07 18:50:10 -0500 |
commit | 7367336c4e5691a15f95fb676d1b857407ade786 (patch) | |
tree | 4a3558e2e426cfa8aa106de4426bc3e583adcf30 /yjit | |
parent | a1c61f0ae5f5ecaa7d8289942b78e6b0c77118fe (diff) |
YJIT: Fix assert in OOM scenario
We still need to do `jit.record_boundary_patch_point = false`
when gen_outlined_exit() returns `None` and we return with `?`.
Previously, we tripped the assert at codegen.rs:1042.
Found with `--yjit-exec-mem-size=3` on the lobsters benchmark.
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Diffstat (limited to 'yjit')
-rw-r--r-- | yjit/src/codegen.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 9d7cbb6947..16f29ead8b 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -853,10 +853,10 @@ fn jump_to_next_insn( // We are at the end of the current instruction. Record the boundary. if jit.record_boundary_patch_point { + jit.record_boundary_patch_point = false; let exit_pc = unsafe { jit.pc.offset(insn_len(jit.opcode).try_into().unwrap()) }; let exit_pos = gen_outlined_exit(exit_pc, &reset_depth, ocb); record_global_inval_patch(asm, exit_pos?); - jit.record_boundary_patch_point = false; } // Generate the jump instruction |