Patch committed: Fix crash in libbacktrace if no debug info

Submitted by Ian Taylor on Sept. 27, 2012, 7:20 p.m.


Message ID
State New
Headers show

Commit Message

Ian Taylor Sept. 27, 2012, 7:20 p.m.
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.


2012-09-27  Ian Lance Taylor  <>

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

Patch hide | download patch | download mbox

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;