mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00: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
2026-01-15 08:21:04 +00:00
@ -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…
x
Reference in New Issue
Block a user