]> granicus.if.org Git - gc/commit
Fix null dereference in print_callers on backtrace_symbols failure
authorIvan Maidanski <ivmai@mail.ru>
Fri, 6 Apr 2018 16:07:50 +0000 (19:07 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 6 Apr 2018 16:10:40 +0000 (19:10 +0300)
commit8fe21d8b12180f77ba6fbd63e7a5aba59685fd0d
treebaa195a85b2067482a6a335ed2b3c440dabf678c
parent9d019e2ef4dd432dd6724daf15566f5aa77ae749
Fix null dereference in print_callers on backtrace_symbols failure

* os_dep.c [NEED_CALLINFO && GC_HAVE_BUILTIN_BACKTRACE
&& !GC_BACKTRACE_SYMBOLS_BROKEN] (GC_print_callers): If sym_name is
NULL then print info[i].ci_pc to buf and set name to buf (instead of
to sym_name[0]).
* os_dep.c [NEED_CALLINFO && GC_HAVE_BUILTIN_BACKTRACE
&& !GC_BACKTRACE_SYMBOLS_BROKEN] (GC_print_callers): Do not call
free(sym_name) if sym_name is NULL.
os_dep.c