diff mbox

Patch committed: Fix crash in libbacktrace if no debug info

Message ID mcr8vbvff1o.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Sept. 27, 2012, 7:20 p.m. UTC
When changing the libbacktrace interface to avoid using mutexes, I
missed a spot.  This caused libbacktrace to crash on a binary with no
debug info.  This patch fixes the problem.  Bootstrapped and ran
libbacktrace tests.  Committed to mainline.

Ian


2012-09-27  Ian Lance Taylor  <iant@google.com>

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

Patch

Index: elf.c
===================================================================
--- elf.c	(revision 191810)
+++ elf.c	(working copy)
@@ -634,7 +634,7 @@  backtrace_initialize (struct backtrace_s
     {
       if (!backtrace_close (descriptor, error_callback, data))
 	goto fail;
-      state->fileline_fn = elf_nodebug;
+      *fileline_fn = elf_nodebug;
       state->fileline_data = NULL;
       return 1;
     }