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
6
gc.c
6
gc.c
@ -13737,6 +13737,11 @@ rb_raw_obj_info_buitin_type(char *const buff, const size_t buff_size, const VALU
|
|||||||
}
|
}
|
||||||
case T_OBJECT:
|
case T_OBJECT:
|
||||||
{
|
{
|
||||||
|
if (rb_shape_obj_too_complex(obj)) {
|
||||||
|
size_t hash_len = rb_st_table_size(ROBJECT_IV_HASH(obj));
|
||||||
|
APPEND_F("(too_complex) len:%zu", hash_len);
|
||||||
|
}
|
||||||
|
else {
|
||||||
uint32_t len = ROBJECT_IV_CAPACITY(obj);
|
uint32_t len = ROBJECT_IV_CAPACITY(obj);
|
||||||
|
|
||||||
if (RANY(obj)->as.basic.flags & ROBJECT_EMBED) {
|
if (RANY(obj)->as.basic.flags & ROBJECT_EMBED) {
|
||||||
@ -13747,6 +13752,7 @@ rb_raw_obj_info_buitin_type(char *const buff, const size_t buff_size, const VALU
|
|||||||
APPEND_F("len:%d ptr:%p", len, (void *)ptr);
|
APPEND_F("len:%d ptr:%p", len, (void *)ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case T_DATA: {
|
case T_DATA: {
|
||||||
const struct rb_block *block;
|
const struct rb_block *block;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user