]> granicus.if.org Git - gc/commit
Fix leak_test crash in print_callers if free() is redirected
authorIvan Maidanski <ivmai@mail.ru>
Mon, 7 Aug 2017 08:37:30 +0000 (11:37 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 7 Aug 2017 22:28:07 +0000 (01:28 +0300)
commit3ebf3d0dc26c57452122ddfe9ec4f9d89f03e75e
tree0aab014dc5dfab90fbb360fda18464643a49ed02
parentaba2fcec5f99e06a54eee636dd61ba15bd4d5e19
Fix leak_test crash in print_callers if free() is redirected

* dbg_mlc.c [REDIRECT_MALLOC && (GC_LINUX_THREADS || GC_SOLARIS_THREADS
|| MSWIN32 || NEED_CALLINFO && GC_HAVE_BUILTIN_BACKTRACE)]
(GC_debug_free): If the object is not in the GC heap then just return
(instead of ABORT).
* malloc.c [REDIRECT_MALLOC && NEED_CALLINFO
&& GC_HAVE_BUILTIN_BACKTRACE] (GC_free): If hhdr is null (i.e. the
object is not in the GC heap) then return without the object
deallocation; add comment.
* os_dep.c [NEED_CALLINFO && GC_HAVE_BUILTIN_BACKTRACE
&& !GC_BACKTRACE_SYMBOLS_BROKEN] (GC_print_callers): Adjust comment
for free().
dbg_mlc.c
malloc.c
os_dep.c