ruby-changes:62511
From: Alan <ko1@a...>
Date: Sun, 2 Aug 2020 12:07:04 +0900 (JST)
Subject: [ruby-changes:62511] ac69849e49 (master): Enable an assert on all configs for debugging
https://git.ruby-lang.org/ruby.git/commit/?id=ac69849e49 From ac69849e49982ea83036c04c5d5f7245e3956a49 Mon Sep 17 00:00:00 2001 From: Alan Wu <alanwu@r...> 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. diff --git a/vm_method.c b/vm_method.c index 2b51605..037ac2a 100644 --- a/vm_method.c +++ b/vm_method.c @@ -136,6 +136,7 @@ static void https://github.com/ruby/ruby/blob/trunk/vm_method.c#L136 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/