Skip to content

Commit

Permalink
gc.c (ruby_mimmalloc): add initialize code for USE_GC_MALLOC_OBJ_INFO…
Browse files Browse the repository at this point in the history
…_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
  • Loading branch information
tarui committed Jun 23, 2018
1 parent 06f54f0 commit a62a776
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a62a776

Please sign in to comment.