diff options
author | Alan Wu <alanwu@ruby-lang.org> | 2020-08-01 23:05:19 -0400 |
---|---|---|
committer | Alan Wu <alanwu@ruby-lang.org> | 2020-08-01 23:05:19 -0400 |
commit | ac69849e49982ea83036c04c5d5f7245e3956a49 (patch) | |
tree | abe023b524132305363213b8fb104899649555b5 /vm_method.c | |
parent | a1246270c55051413ef5830684baff94e1139814 (diff) |
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.
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 |