diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-06-03 16:54:05 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-06-03 23:42:19 +0900 |
commit | 17b89849c6076777ccfd014f191f8c97f81f8cae (patch) | |
tree | aa896a8817c93ee62b5a682cfa5c7bae2ecb8f40 | |
parent | ba01d15cf5db96933905d669c68f5cc0cd6910b8 (diff) |
Count uninitialized call cache as miss empty
Fix segfault at start up when `USE_DEBUG_COUNTER` is enabled.
-rw-r--r-- | vm_insnhelper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 09cca908dc..46737145ca 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -2209,7 +2209,7 @@ vm_search_method_slowpath0(VALUE cd_owner, struct rb_call_data *cd, VALUE klass) } #if USE_DEBUG_COUNTER - if (old_cc == empty_cc) { + if (!old_cc || old_cc == empty_cc) { // empty RB_DEBUG_COUNTER_INC(mc_inline_miss_empty); } |