From: Eric Wong Date: 2014-01-06T04:22:03+00:00 Subject: [ruby-core:59568] Re: [ruby-trunk - Feature #9362][Assigned] Minimize cache misshit to gain optimal speed Urabe Shyouhei 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;