@@ -1873,14 +1873,7 @@ build_id_to_obj_i(VALUE obj, void *data)
18731873{
18741874 st_table * id_to_obj_tbl = (st_table * )data ;
18751875 if (rb_shape_obj_has_id (obj )) {
1876- VALUE id = rb_obj_id (obj );
1877- if (FIXNUM_P (id )) {
1878- fprintf (stderr , "build_id_to_obj_i insert id=%llu, obj=%" PRIxVALUE "\n" , NUM2ULL (id ), obj );
1879- }
1880- else {
1881- rb_bug ("Invalid object_id %s" , rb_obj_info (id ));
1882- }
1883- st_insert (id_to_obj_tbl , id , obj );
1876+ st_insert (id_to_obj_tbl , rb_obj_id (obj ), obj );
18841877 }
18851878}
18861879
@@ -1924,10 +1917,7 @@ obj_free_object_id(VALUE obj)
19241917 if (rb_shape_obj_has_id (obj )) {
19251918 VALUE obj_id = rb_obj_id (obj );
19261919 if (!FIXNUM_P (obj_id )) {
1927- rb_bug ("Corrupted object_id=%s obj=%s / %" PRIxVALUE ", shape_id=%d" , rb_obj_info (obj_id ), rb_obj_info (obj ), obj , shape_id );
1928- }
1929- else {
1930- fprintf (stderr , "obj_free_object_id delete id=%llu, obj=%" PRIxVALUE "\n" , NUM2ULL (obj_id ), obj );
1920+ rb_bug ("Corrupted object_id=%s obj=%s, shape_id=%d" , rb_obj_info (obj_id ), rb_obj_info (obj ), shape_id );
19311921 }
19321922 st_data_t id = (st_data_t )obj_id ;
19331923 GC_ASSERT (id );
@@ -3711,7 +3701,6 @@ vm_weak_table_id_to_obj_foreach(st_data_t key, st_data_t value, st_data_t data)
37113701 if (value != new_value ) {
37123702 DURING_GC_COULD_MALLOC_REGION_START ();
37133703 {
3714- fprintf (stderr , "vm_weak_table_id_to_obj_foreach insert id=%llu, obj=%" PRIxVALUE "\n" , NUM2ULL ((VALUE )key ), new_value );
37153704 st_insert (id_to_obj_tbl , key , (st_data_t )new_value );
37163705 }
37173706 DURING_GC_COULD_MALLOC_REGION_END ();
@@ -5309,7 +5298,7 @@ rb_gc_after_fork(rb_pid_t pid)
53095298void
53105299Init_GC (void )
53115300{
5312- id_to_obj_tbl = st_init_table (& object_id_hash_type ); // DEBUG: make bug more likely to trigger.
5301+ id_to_obj_tbl = st_init_table (& object_id_hash_type );
53135302#undef rb_intern
53145303 rb_gc_register_address (& id_to_obj_value );
53155304
0 commit comments