Blame SOURCES/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch

a8223e
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
a8223e
From: Fedora GDB patches <invalid@email.com>
a8223e
Date: Fri, 27 Oct 2017 21:07:50 +0200
a8223e
Subject: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
a8223e
a8223e
;; Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
a8223e
;;=fedora
a8223e
a8223e
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
a8223e
a8223e
diff --git a/gdb/symtab.c b/gdb/symtab.c
a8223e
--- a/gdb/symtab.c
a8223e
+++ b/gdb/symtab.c
a8223e
@@ -3169,6 +3169,13 @@ struct symtab_and_line
a8223e
 	     msymbol->linkage_name ()); */
a8223e
 	  ;
a8223e
 	/* fall through */
a8223e
+	/* `msymbol' trampoline may be located before its .text symbol
a8223e
+	   but this text symbol may be the address we were looking for.
a8223e
+	   Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
a8223e
+	   Red Hat Bug 218379.  */
a8223e
+	else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
a8223e
+	  warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", msymbol.minsym->linkage_name (), paddress (target_gdbarch (), pc));
a8223e
+	/* fall through */
a8223e
 	else
a8223e
 	  {
a8223e
 	    /* Detect an obvious case of infinite recursion.  If this