mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fix assertion on gc_cc_cme()
`cc->cme_` can be NULL when it is not initialized yet. It can be observed on `GC.stress == true` running.
This commit is contained in:
parent
aceb75f6c9
commit
ca21eed6eb
Notes:
git
2021-11-25 13:58:16 +09:00
1 changed files with 3 additions and 1 deletions
|
@ -334,7 +334,9 @@ static inline const struct rb_callable_method_entry_struct *
|
|||
vm_cc_cme(const struct rb_callcache *cc)
|
||||
{
|
||||
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
||||
VM_ASSERT(!vm_cc_markable(cc) || cc->cme_ != NULL);
|
||||
VM_ASSERT(cc->call_ == NULL || // not initialized yet
|
||||
!vm_cc_markable(cc) ||
|
||||
cc->cme_ != NULL);
|
||||
|
||||
return cc->cme_;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue