Project

General

Profile

« Previous | Next » 

Revision 24fe22a5

Added by alanwu (Alan Wu) almost 2 years ago

Fix ordering for auto compaction in get_overloaded_cme()

Found through GC.stress + GC.auto_compact crashes in GH-8932.
Previously, the compaction run within rb_method_entry_alloc() could
move the def->body.iseq.cref and iseqptr set up before the call and
leave the def pointing to moved addresses. Nothing was marking def
during that GC run.

Low probability reproducer:

GC.stress = true GC.auto_compact = true arr = [] alloc = 1000.times.map { [] } alloc = nil a = arr.first GC.start