diff options
author | Koichi Sasada <[email protected]> | 2021-11-25 12:18:15 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2021-11-25 13:57:49 +0900 |
commit | ca21eed6ebbceca68daa7b2a88e69a58b8d56806 (patch) | |
tree | 641e2fea1d72272bad4c3df236861dd1757a17fb /vm_callinfo.h | |
parent | aceb75f6c9d13ce178e8c4a123d9f95c51875fe7 (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5172
Diffstat (limited to 'vm_callinfo.h')
-rw-r--r-- | vm_callinfo.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_callinfo.h b/vm_callinfo.h index b3aafd6de1..700fd3dc6c 100644 --- a/vm_callinfo.h +++ b/vm_callinfo.h @@ -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_; } |