Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci in iseq can only be object or null #7147

Merged
merged 1 commit into from Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions iseq.c
Expand Up @@ -324,7 +324,7 @@ rb_iseq_update_references(rb_iseq_t *iseq)
if (body->call_data) {
for (unsigned int i=0; i<body->ci_size; i++) {
struct rb_call_data *cds = body->call_data;
if (!SPECIAL_CONST_P((VALUE)cds[i].ci)) {
if (cds[i].ci) {
cds[i].ci = (struct rb_callinfo *)rb_gc_location((VALUE)cds[i].ci);
}
cds[i].cc = (struct rb_callcache *)rb_gc_location((VALUE)cds[i].cc);
Expand Down Expand Up @@ -400,7 +400,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
const struct rb_callinfo *ci = cds[i].ci;
const struct rb_callcache *cc = cds[i].cc;

if (vm_ci_markable(ci)) {
if (ci) {
rb_gc_mark_movable((VALUE)ci);
}

Expand Down