Blame SOURCES/gdb-moribund-utrace-workaround.patch

4c2ad1
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
4c2ad1
From: Fedora GDB patches <invalid@email.com>
4c2ad1
Date: Fri, 27 Oct 2017 21:07:50 +0200
4c2ad1
Subject: gdb-moribund-utrace-workaround.patch
4c2ad1
4c2ad1
;; Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
4c2ad1
;;=push+jan: Currently it is still not fully safe.
4c2ad1
4c2ad1
https://bugzilla.redhat.com/show_bug.cgi?id=590623
4c2ad1
http://sources.redhat.com/bugzilla/show_bug.cgi?id=11593
4c2ad1
4c2ad1
Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
4c2ad1
4c2ad1
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
4c2ad1
--- a/gdb/breakpoint.c
4c2ad1
+++ b/gdb/breakpoint.c
4c2ad1
@@ -12016,6 +12016,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
4c2ad1
 		 traps we can no longer explain.  */
4c2ad1
 
4c2ad1
 	      old_loc->events_till_retirement = 3 * (thread_count () + 1);
4c2ad1
+	      /* Red Hat Bug 590623.  */
4c2ad1
+	      old_loc->events_till_retirement *= 10;
4c2ad1
 	      old_loc->owner = NULL;
4c2ad1
 
4c2ad1
 	      VEC_safe_push (bp_location_p, moribund_locations, old_loc);