diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2020-08-18 17:34:03 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2020-08-18 19:10:51 -0700 |
commit | 7a58ee9b962ad0072e5213d3512c809048e4eba1 (patch) | |
tree | f74ee3e8e7b2fd2a1a3d3251a073fad008beae4f /test | |
parent | 371c051ca885274a9991e216b6ff6b75fb5c7ff9 (diff) | |
download | ruby-7a58ee9b962ad0072e5213d3512c809048e4eba1.tar.gz |
Update references when tracing allocations
The allocation tracing code keeps essentially a weak reference to
objects that have been allocated (storing the allocation information
along with the weak ref). Compacting the heap would break references in
this weak map, so the wrong values could be returned.
This commit just updates the values in the weak ref in order to fix the
allocation tracing book keeping
Diffstat (limited to 'test')
-rw-r--r-- | test/objspace/test_objspace.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index 28c0431456..42fbc3e03c 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -194,7 +194,7 @@ class TestObjSpace < Test::Unit::TestCase assert_equal(self.class.name, ObjectSpace.allocation_class_path(o3)) assert_equal(__method__, ObjectSpace.allocation_method_id(o3)) } - end if false # TODO: tenderlove is debugging it [Tue Aug 18 11:00:49 2020 JST] + end def test_trace_object_allocations_start_stop_clear ObjectSpace.trace_object_allocations_clear # clear object_table to get rid of erroneous detection for obj3 |