Urabe Shyouhei <shyouhei / ruby-lang.org> wrote:
> On 01/06/2014 12:02 PM, Eric Wong wrote:
> > gdb bt: http://80x24.org/fe8820a15f0c7a25a532968601c645d1de7a3f95.bt.gz
> 
> Hmm, seems like someone (most possibly me) forgot to add write barrier
> to properly interact with RGenGC.

I am testing this, it looks like GC is confused by EMBED_FLAG being
set and having ->ntbl:

--- a/hash.c
+++ b/hash.c
@@ -866,7 +866,8 @@ rb_hash_rehash(VALUE hash)
     rb_hash_modify_check(hash);
     if (!RHASH(hash)->ntbl)
         return hash;
-    tmp = hash_alloc(0);
+    tmp = rb_hash_new();
+    explode(tmp);
     tbl = st_init_table_with_size(RHASH(hash)->ntbl->type, RHASH(hash)->ntbl->num_entries);
     RHASH(tmp)->ntbl = tbl;