diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2020-09-22 19:05:33 -0400 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:23 -0400 |
| commit | 2eaf55fcf1f7afbd0190e47ffe352b29047e6144 (patch) | |
| tree | 68f5aa09d2190634d861c9ba143d24541550faf5 | |
| parent | 86c438d12990d94fcd6ca1853423e19026de2a7f (diff) | |
Update PC in memory when exiting jitted code
Without this, the allocation tracker was inaccurate and
was causing a failure in `test/objspace/test_objspace.rb`.
| -rw-r--r-- | ujit_compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ujit_compile.c b/ujit_compile.c index bfe75d1b7b..fae676db3b 100644 --- a/ujit_compile.c +++ b/ujit_compile.c @@ -212,6 +212,8 @@ ujit_compile_insn(rb_iseq_t *iseq, unsigned int insn_idx, unsigned int* next_uji // Directly return the next PC, which is a constant mov(cb, RAX, const_ptr_opnd(ctx.pc)); + // Write PC back into the CFP + mov(cb, mem_opnd(64, RDI, 0), RAX); // Write the post call bytes ujit_instr_exit(cb); |
