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

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