1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
tarui 2018-06-23 13:58:51 +00:00
parent 06f54f0303
commit a62a776d57

7
gc.c
View file

@ -8247,6 +8247,13 @@ ruby_mimmalloc(size_t size)
{
struct malloc_obj_info *info = mem;
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;
}
#endif