@@ -3526,11 +3526,11 @@ gc_page_sweep(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_
3526
3526
if (bitset & 1 ) {
3527
3527
switch (BUILTIN_TYPE (p )) {
3528
3528
default : { /* majority case */
3529
- gc_report (2 , objspace , "page_sweep: free %s \n" , obj_info (( VALUE ) p ) );
3529
+ gc_report (2 , objspace , "page_sweep: free %p \n" , ( void * ) p );
3530
3530
#if USE_RGENGC && RGENGC_CHECK_MODE
3531
3531
if (!is_full_marking (objspace )) {
3532
- if (RVALUE_OLD_P ((VALUE )p )) rb_bug ("page_sweep: %s - old while minor GC." , obj_info (( VALUE ) p ) );
3533
- if (rgengc_remembered (objspace , (VALUE )p )) rb_bug ("page_sweep: %s - remembered." , obj_info (( VALUE ) p ) );
3532
+ if (RVALUE_OLD_P ((VALUE )p )) rb_bug ("page_sweep: %p - old while minor GC." , ( void * ) p );
3533
+ if (rgengc_remembered (objspace , (VALUE )p )) rb_bug ("page_sweep: %p - remembered." , ( void * ) p );
3534
3534
}
3535
3535
#endif
3536
3536
if (obj_free (objspace , (VALUE )p )) {
@@ -5960,26 +5960,26 @@ NOINLINE(static void gc_writebarrier_incremental(VALUE a, VALUE b, rb_objspace_t
5960
5960
static void
5961
5961
gc_writebarrier_incremental (VALUE a , VALUE b , rb_objspace_t * objspace )
5962
5962
{
5963
- gc_report (2 , objspace , "gc_writebarrier_incremental: [LG] %s -> %s\n" , obj_info ( a ) , obj_info (b ));
5963
+ gc_report (2 , objspace , "gc_writebarrier_incremental: [LG] %p -> %s\n" , ( void * ) a , obj_info (b ));
5964
5964
5965
5965
if (RVALUE_BLACK_P (a )) {
5966
5966
if (RVALUE_WHITE_P (b )) {
5967
5967
if (!RVALUE_WB_UNPROTECTED (a )) {
5968
- gc_report (2 , objspace , "gc_writebarrier_incremental: [IN] %s -> %s\n" , obj_info ( a ) , obj_info (b ));
5968
+ gc_report (2 , objspace , "gc_writebarrier_incremental: [IN] %p -> %s\n" , ( void * ) a , obj_info (b ));
5969
5969
gc_mark_from (objspace , b , a );
5970
5970
}
5971
5971
}
5972
5972
else if (RVALUE_OLD_P (a ) && !RVALUE_OLD_P (b )) {
5973
5973
if (!RVALUE_WB_UNPROTECTED (b )) {
5974
- gc_report (1 , objspace , "gc_writebarrier_incremental: [GN] %s -> %s\n" , obj_info ( a ) , obj_info (b ));
5974
+ gc_report (1 , objspace , "gc_writebarrier_incremental: [GN] %p -> %s\n" , ( void * ) a , obj_info (b ));
5975
5975
RVALUE_AGE_SET_OLD (objspace , b );
5976
5976
5977
5977
if (RVALUE_BLACK_P (b )) {
5978
5978
gc_grey (objspace , b );
5979
5979
}
5980
5980
}
5981
5981
else {
5982
- gc_report (1 , objspace , "gc_writebarrier_incremental: [LL] %s -> %s\n" , obj_info ( a ) , obj_info (b ));
5982
+ gc_report (1 , objspace , "gc_writebarrier_incremental: [LL] %p -> %s\n" , ( void * ) a , obj_info (b ));
5983
5983
gc_remember_unprotected (objspace , b );
5984
5984
}
5985
5985
}
@@ -9358,7 +9358,7 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
9358
9358
break ;
9359
9359
}
9360
9360
case T_IMEMO : {
9361
- const char * imemo_name ;
9361
+ const char * imemo_name = "\0" ;
9362
9362
switch (imemo_type (obj )) {
9363
9363
#define IMEMO_NAME (x ) case imemo_##x: imemo_name = #x; break;
9364
9364
IMEMO_NAME (env );
@@ -9378,12 +9378,17 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
9378
9378
switch (imemo_type (obj )) {
9379
9379
case imemo_ment : {
9380
9380
const rb_method_entry_t * me = & RANY (obj )-> as .imemo .ment ;
9381
- snprintf (buff , buff_size , "%s (called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)" , buff ,
9382
- rb_id2name (me -> called_id ),
9383
- method_type_name (me -> def -> type ),
9384
- me -> def -> alias_count ,
9385
- obj_info (me -> owner ),
9386
- obj_info (me -> defined_class ));
9381
+ if (me -> def ) {
9382
+ snprintf (buff , buff_size , "%s (called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)" , buff ,
9383
+ rb_id2name (me -> called_id ),
9384
+ method_type_name (me -> def -> type ),
9385
+ me -> def -> alias_count ,
9386
+ obj_info (me -> owner ),
9387
+ obj_info (me -> defined_class ));
9388
+ }
9389
+ else {
9390
+ snprintf (buff , buff_size , "%s" , rb_id2name (me -> called_id ));
9391
+ }
9387
9392
break ;
9388
9393
}
9389
9394
case imemo_iseq : {
0 commit comments