diff options
author | Peter Zhu <[email protected]> | 2023-07-31 14:52:25 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-07-31 14:52:25 -0400 |
commit | 36d669b73db26368cb9492231be4b3d4ed97f111 () | |
tree | 443312ae568d46404743c9a253a1734a71b988ad | |
parent | 8b390a456ce7dc7ef942a8a2cfba2a944c3d25bd (diff) |
Fix test_gc_parameter_init_slots
If the stack is not cleared (e.g. compiling with -O0), then `ary` could remain on the stack, which would be marked. Clear the array first to make sure all the objects can be GC'd.
-rw-r--r-- | test/ruby/test_gc.rb | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -438,6 +438,7 @@ class TestGc < Test::Unit::TestCase while GC.stat_heap(0, :heap_allocatable_pages) != 0 ary << Object.new end ary = nil # Clear all the objects that were allocated. |