File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1912,16 +1912,12 @@ object_id_to_ref(void *objspace_ptr, VALUE object_id)
19121912static inline void
19131913obj_free_object_id (VALUE obj )
19141914{
1915- if (FL_TEST_RAW (obj , RUBY_FL_UNUSED9 )) {
1916- rb_bug ("already freed that object_id %s" , rb_obj_info (obj ));
1917- }
1918- else {
1919- FL_SET_RAW (obj , RUBY_FL_UNUSED9 );
1920- }
1921-
19221915 if (RB_UNLIKELY (id_to_obj_tbl )) {
19231916 if (rb_shape_obj_has_id (obj )) {
19241917 VALUE obj_id = rb_obj_id (obj );
1918+ if (!FIXNUM_P (obj_id )) {
1919+ rb_bug ("Corrupted object_id=%s obj=%s" , rb_obj_info (obj_id ), rb_obj_info (obj ));
1920+ }
19251921 st_data_t id = (st_data_t )obj_id ;
19261922 GC_ASSERT (id );
19271923
@@ -1935,6 +1931,13 @@ obj_free_object_id(VALUE obj)
19351931void
19361932rb_gc_obj_free_vm_weak_references (VALUE obj )
19371933{
1934+ if (FL_TEST_RAW (obj , RUBY_FL_UNUSED9 )) {
1935+ rb_bug ("already freed that object %s" , rb_obj_info (obj ));
1936+ }
1937+ else {
1938+ FL_SET_RAW (obj , RUBY_FL_UNUSED9 );
1939+ }
1940+
19381941 obj_free_object_id (obj );
19391942
19401943 if (FL_TEST (obj , FL_EXIVAR )) {
You can’t perform that action at this time.
0 commit comments