ruby-changes:51523
From: tarui <ko1@a...>
Date: Sat, 23 Jun 2018 22:58:56 +0900 (JST)
Subject: [ruby-changes:51523] tarui:r63733 (trunk): gc.c (ruby_mimmalloc): add initialize code for USE_GC_MALLOC_OBJ_INFO_DETAILS
tarui 2018-06-23 22:58:51 +0900 (Sat, 23 Jun 2018) New Revision: 63733 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63733 Log: 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 Modified files: trunk/gc.c Index: gc.c =================================================================== --- gc.c (revision 63732) +++ gc.c (revision 63733) @@ -8247,6 +8247,13 @@ ruby_mimmalloc(size_t size) https://github.com/ruby/ruby/blob/trunk/gc.c#L8247 { 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/