[backtrace] Avoid segfault
authorNathan Sidwell <nathan@acm.org>
Fri, 25 Jan 2019 17:16:53 +0000 (17:16 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 25 Jan 2019 17:16:53 +0000 (17:16 +0000)
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
libbacktrace/elf.c

index 55ccd62261edbbb0589f12b690991628f3196192..b26b78148cf6f0e8f722b9bb5047b16870e5e668 100644 (file)
@@ -1,3 +1,8 @@
+2019-01-25  Nathan Sidwell  <nathan@acm.org>
+
+       * elf.c (elf_add): Pass "" filename to recursive call with
+       separated debug.
+
 2019-01-25  Tom de Vries  <tdevries@suse.de>
 
        * elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
index 632477f3099d6f4bac421e56476137e882cd8e44..6fee865bece700081005b3a0a3a7f743a89f9a18 100644 (file)
@@ -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)