summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-23 13:58:51 +0000
committertarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-23 13:58:51 +0000
commita62a776d575ada3cb3a8ae2beb8a2908a27648a1 (patch)
tree1cf388e3777a4a43080ad7dddb517bc6b2e224d8
parent06f54f03039c225c5c0b5d1709865fb4fff02776 (diff)
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
-rw-r--r--gc.c7
1 files changed, 7 insertions, 0 deletions
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