From 3ec6bc5e36bb6c79305fb962d395f8a003753d74 Mon Sep 17 00:00:00 2001 From: tarui Date: Sat, 23 Jun 2018 13:58:51 +0000 Subject: 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 --- gc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gc.c') diff --git a/gc.c b/gc.c index db2b1ff9e2..bf47be625a 100644 --- a/gc.c +++ b/gc.c @@ -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 -- cgit v1.2.3