Fix rp(too_complex_t_object)
tripping assert
Previously, it tripped the assert about too_complex in ROBJECT_IV_CAPACITY(). This fixes double faults for some crashes and helps with use during development.
This commit is contained in:
parent
440b59db10
commit
ecdb112881
18
gc.c
18
gc.c
@ -13737,14 +13737,20 @@ rb_raw_obj_info_buitin_type(char *const buff, const size_t buff_size, const VALU
|
|||||||
}
|
}
|
||||||
case T_OBJECT:
|
case T_OBJECT:
|
||||||
{
|
{
|
||||||
uint32_t len = ROBJECT_IV_CAPACITY(obj);
|
if (rb_shape_obj_too_complex(obj)) {
|
||||||
|
size_t hash_len = rb_st_table_size(ROBJECT_IV_HASH(obj));
|
||||||
if (RANY(obj)->as.basic.flags & ROBJECT_EMBED) {
|
APPEND_F("(too_complex) len:%zu", hash_len);
|
||||||
APPEND_F("(embed) len:%d", len);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
VALUE *ptr = ROBJECT_IVPTR(obj);
|
uint32_t len = ROBJECT_IV_CAPACITY(obj);
|
||||||
APPEND_F("len:%d ptr:%p", len, (void *)ptr);
|
|
||||||
|
if (RANY(obj)->as.basic.flags & ROBJECT_EMBED) {
|
||||||
|
APPEND_F("(embed) len:%d", len);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
VALUE *ptr = ROBJECT_IVPTR(obj);
|
||||||
|
APPEND_F("len:%d ptr:%p", len, (void *)ptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user