From ac69849e49982ea83036c04c5d5f7245e3956a49 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Sat, 1 Aug 2020 23:05:19 -0400 Subject: Enable an assert on all configs for debugging I'm trying to get a better understanding for rare crashes that happen on ci: - http://ci.rvm.jp/results/trunk_clang_10@silicon-docker/3101898 - http://ci.rvm.jp/results/trunk-test@ruby-sky1/2777695 Looking at the stack trace it looks like a type confusion possibly induced by heap corruption. I'm hoping to verify this theory. --- vm_method.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vm_method.c') diff --git a/vm_method.c b/vm_method.c index 2b51605433..037ac2a655 100644 --- a/vm_method.c +++ b/vm_method.c @@ -136,6 +136,7 @@ static void clear_method_cache_by_id_in_class(VALUE klass, ID mid) { VM_ASSERT(RB_TYPE_P(klass, T_CLASS) || RB_TYPE_P(klass, T_ICLASS)); + if (!(RB_TYPE_P(klass, T_CLASS) || RB_TYPE_P(klass, T_ICLASS))) rb_bug("type confusion"); // temporary. Remove before release if (LIKELY(RCLASS_EXT(klass)->subclasses == NULL)) { // no subclasses -- cgit v1.2.3