mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Mark all cc_entries associated to compiled_iseq
This commit is contained in:
parent
8562bfd150
commit
43e18c68f4
1 changed files with 2 additions and 1 deletions
3
mjit.c
3
mjit.c
|
@ -1021,7 +1021,8 @@ mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body)
|
|||
{
|
||||
const struct rb_callcache **cc_entries;
|
||||
if (body->jit_unit && (cc_entries = body->jit_unit->cc_entries) != NULL) {
|
||||
for (unsigned int i = 0; i < body->ci_size; i++) {
|
||||
// It must be `body->jit_unit->cc_entries_size` instead of `body->ci_size` to mark children's cc_entries
|
||||
for (unsigned int i = 0; i < body->jit_unit->cc_entries_size; i++) {
|
||||
const struct rb_callcache *cc = cc_entries[i];
|
||||
if (cc != NULL) {
|
||||
// Pin `cc` and `cc->cme` against GC.compact as their addresses may be written in JIT-ed code.
|
||||
|
|
Loading…
Add table
Reference in a new issue