mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Output parent object info when marking T_NONE
This commit is contained in:
parent
8c73da9e66
commit
636da19e2b
@ -4395,7 +4395,15 @@ gc_mark_check_t_none(rb_objspace_t *objspace, VALUE obj)
|
||||
char obj_info_buf[256];
|
||||
rb_raw_obj_info(obj_info_buf, 256, obj);
|
||||
|
||||
rb_bug("try to mark T_NONE object (obj: %s)", obj_info_buf);
|
||||
char parent_obj_info_buf[256];
|
||||
if (objspace->rgengc.parent_object == Qfalse) {
|
||||
strcpy(parent_obj_info_buf, "(none)");
|
||||
}
|
||||
else {
|
||||
rb_raw_obj_info(parent_obj_info_buf, 256, objspace->rgengc.parent_object);
|
||||
}
|
||||
|
||||
rb_bug("try to mark T_NONE object (obj: %s, parent: %s)", obj_info_buf, parent_obj_info_buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
gc/gc.h
2
gc/gc.h
@ -58,7 +58,7 @@ RUBY_SYMBOL_EXPORT_BEGIN
|
||||
// files in Ruby.
|
||||
size_t rb_size_mul_or_raise(size_t x, size_t y, VALUE exc);
|
||||
void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
|
||||
void rb_obj_info_dump(VALUE obj);
|
||||
const char *rb_raw_obj_info(char *const buff, const size_t buff_size, VALUE obj);
|
||||
const char *rb_obj_info(VALUE obj);
|
||||
size_t rb_obj_memsize_of(VALUE obj);
|
||||
bool ruby_free_at_exit_p(void);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user