This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/81081] [ASAN] ASAN is not properly calling libbacktrace to symbolize program written on assembler
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Jun 2017 12:50:06 +0000
- Subject: [Bug sanitizer/81081] [ASAN] ASAN is not properly calling libbacktrace to symbolize program written on assembler
- Auto-submitted: auto-generated
- References: <bug-81081-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81081
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Denis Khalikov from comment #3)
> This fix
> 111 AddressInfo *info = cdata->get_new_frame(addr);
> 112 if (filename)
> 113 info->file = internal_strdup(filename);
> 114 info->line = lineno;
> 115 if (function) {
> 116 info->function = DemangleAlloc(function, /*always_alloc*/ true);
> 117 cdata->frames_symbolized++;
> 118 }
> 119 return 0;
> 120 }
I think you should just return 0; early if function == NULL and
cdata->frames_symbolized > 0, trying to augment that case with
backtrace_syminfo doesn't look right.