libbacktrace patch committed: Avoid multiple error messages

Message ID
State New
Headers show

Commit Message

Ian Taylor Sept. 29, 2012, 5:50 p.m.
PR 54749 points out that if libbacktrace fails to read the debug info
from the executable (in the case of that PR, due to memory exhaustion)
the compiler will print multiple error messages.  The library already
has a mechanism to avoid this, and this patch uses that mechanism.
Bootstrapped and ran libbacktrace testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.


2012-09-29  Ian Lance Taylor  <>

	PR other/54749
	* fileline.c (fileline_initialize): Pass errnum as -1 when
	reporting that we could not read executable information after a
	previous failure.


Index: fileline.c
--- fileline.c	(revision 191853)
+++ fileline.c	(working copy)
@@ -63,7 +63,7 @@  fileline_initialize (struct backtrace_st
   if (failed)
-      error_callback (data, "failed to read executable information", 0);
+      error_callback (data, "failed to read executable information", -1);
       return 0;