]> 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>
Tue, 8 Aug 2017 07:49:24 +0000 (10:49 +0300)
commit862f5a8458ddbee82426e53f7a6be3c0bd690860
tree8bfbdfee5c3f388f89821f977270dd8f8af6e82a
parent109652ba7e1547a5bbe47602941fbd447b039601
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