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

4a80f0
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
4a80f0
From: Fedora GDB patches <invalid@email.com>
4a80f0
Date: Fri, 27 Oct 2017 21:07:50 +0200
4a80f0
Subject: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
4a80f0
4a80f0
;; Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
4a80f0
;;=fedora
4a80f0
4a80f0
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
4a80f0
4a80f0
diff --git a/gdb/symtab.c b/gdb/symtab.c
4a80f0
--- a/gdb/symtab.c
4a80f0
+++ b/gdb/symtab.c
4a80f0
@@ -3169,6 +3169,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
4a80f0
 	     msymbol->linkage_name ()); */
4a80f0
 	  ;
4a80f0
 	/* fall through */
4a80f0
+	/* `msymbol' trampoline may be located before its .text symbol
4a80f0
+	   but this text symbol may be the address we were looking for.
4a80f0
+	   Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
4a80f0
+	   Red Hat Bug 218379.  */
4a80f0
+	else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
4a80f0
+	  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));
4a80f0
+	/* fall through */
4a80f0
 	else
4a80f0
 	  {
4a80f0
 	    /* Detect an obvious case of infinite recursion.  If this