From 588f4f8fc148d4da5107f72409c65192431a411c Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@google.com>
Date: Thu, 27 Sep 2012 19:20:49 +0000
Subject: [PATCH] re PR other/54726 (libbacktrace segfaults on gcc_asserts with
 stripped gcc)

	PR other/54726
	* elf.c (backtrace_initialize): Set *fileln_fn, not
	state->fileln_fn.

From-SVN: r191811
---
 libbacktrace/ChangeLog | 6 ++++++
 libbacktrace/elf.c     | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index e5baeb53506d..0405684a9db5 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-27  Ian Lance Taylor  <iant@google.com>
+
+	PR other/54726
+	* elf.c (backtrace_initialize): Set *fileln_fn, not
+	state->fileln_fn.
+
 2012-09-19  Ian Lance Taylor  <iant@google.com>
 
 	* configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c
index 0c0c8eb62e6e..fd0ecd777b61 100644
--- a/libbacktrace/elf.c
+++ b/libbacktrace/elf.c
@@ -634,7 +634,7 @@ backtrace_initialize (struct backtrace_state *state, int descriptor,
     {
       if (!backtrace_close (descriptor, error_callback, data))
 	goto fail;
-      state->fileline_fn = elf_nodebug;
+      *fileline_fn = elf_nodebug;
       state->fileline_data = NULL;
       return 1;
     }
-- 
GitLab