gc.c (ruby_mimmalloc): add initialize code for USE_GC_MALLOC_OBJ_INFO_DETAILS
We often had SEGV in ruby_xfree when USE_GC_MALLOC_OBJ_INFO_DETAILS is 1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
06f54f0303
commit
a62a776d57
7
gc.c
7
gc.c
@ -8247,6 +8247,13 @@ ruby_mimmalloc(size_t size)
|
|||||||
{
|
{
|
||||||
struct malloc_obj_info *info = mem;
|
struct malloc_obj_info *info = mem;
|
||||||
info->size = 0;
|
info->size = 0;
|
||||||
|
#if USE_GC_MALLOC_OBJ_INFO_DETAILS
|
||||||
|
info->gen = 0;
|
||||||
|
info->file = NULL;
|
||||||
|
info->line = 0;
|
||||||
|
#else
|
||||||
|
info->file = NULL;
|
||||||
|
#endif
|
||||||
mem = info + 1;
|
mem = info + 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user