mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rb_eql_opt,rb_equal_opt: purge stale cc
When on USE_EMBED_CI, cd is stored statically. Previous use could cache stale cd->cc, which could have already been GCed. Need flush them.
This commit is contained in:
parent
ffe58b9c8b
commit
1016cff4ff
Notes:
git
2020-06-09 09:53:14 +09:00
1 changed files with 2 additions and 4 deletions
|
@ -1799,15 +1799,14 @@ rb_equal_opt(VALUE obj1, VALUE obj2)
|
|||
#if USE_EMBED_CI
|
||||
static struct rb_call_data cd = {
|
||||
.ci = vm_ci_new_id(idEq, 0, 1, 0),
|
||||
.cc = &vm_empty_cc,
|
||||
};
|
||||
#else
|
||||
struct rb_call_data cd = {
|
||||
.ci = &VM_CI_ON_STACK(idEq, 0, 1, 0),
|
||||
.cc = &vm_empty_cc,
|
||||
};
|
||||
#endif
|
||||
|
||||
cd.cc = &vm_empty_cc;
|
||||
return opt_equality(NULL, obj1, obj2, &cd);
|
||||
}
|
||||
|
||||
|
@ -1819,15 +1818,14 @@ rb_eql_opt(VALUE obj1, VALUE obj2)
|
|||
#if USE_EMBED_CI
|
||||
static struct rb_call_data cd = {
|
||||
.ci = vm_ci_new_id(idEqlP, 0, 1, 0),
|
||||
.cc = &vm_empty_cc,
|
||||
};
|
||||
#else
|
||||
struct rb_call_data cd = {
|
||||
.ci = &VM_CI_ON_STACK(idEqlP, 0, 1, 0),
|
||||
.cc = &vm_empty_cc,
|
||||
};
|
||||
#endif
|
||||
|
||||
cd.cc = &vm_empty_cc;
|
||||
return opt_equality(NULL, obj1, obj2, &cd);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue