From 4bfcd1393834660ceb25507652c691d91d5a1c1a Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 25 Jan 2019 17:16:53 +0000 Subject: [PATCH] [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. From-SVN: r268275 --- libbacktrace/ChangeLog | 5 +++++ libbacktrace/elf.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 55ccd62261e..b26b78148cf 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 632477f3099..6fee865bece 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) -- 2.30.2