From: nathan Date: Fri, 25 Jan 2019 17:16:53 +0000 (+0000) Subject: [backtrace] Avoid segfault X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ff929d25ff89cf338b3005bcaaf95130798e66e;p=thirdparty%2Fgcc.git [backtrace] Avoid segfault https://gcc.gnu.org/ml/gcc-patches/2019-01/msg01521.html * elf.c (elf_add): Pass "" filename to recursive call with separated debug. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268275 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 55ccd62261ed..b26b78148cf6 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,8 @@ +2019-01-25 Nathan Sidwell + + * elf.c (elf_add): Pass "" filename to recursive call with + separated debug. + 2019-01-25 Tom de Vries * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index 632477f3099d..6fee865bece7 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -3041,7 +3041,7 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor, if (debugaltlink_view_valid) backtrace_release_view (state, &debugaltlink_view, error_callback, data); - ret = elf_add (state, NULL, d, base_address, error_callback, data, + ret = elf_add (state, "", d, base_address, error_callback, data, fileline_fn, found_sym, found_dwarf, NULL, 0, 1, NULL, 0); if (ret < 0)