[gdb/f14/master] - [ifunc] Fix possible crash on deleting breakpoints (BZ 673483).

Jan Kratochvil jankratochvil at fedoraproject.org
Fri Jan 28 13:52:58 UTC 2011


commit 35705aecc863d6d4e72cd6a9059c2461ec65e4c9
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date:   Fri Jan 28 14:52:45 2011 +0100

    - [ifunc] Fix possible crash on deleting breakpoints (BZ 673483).

 gdb-ifunc-unchain.patch |   39 +++++++++++++++++++++++++++++++++++++++
 gdb.spec                |    9 ++++++++-
 2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/gdb-ifunc-unchain.patch b/gdb-ifunc-unchain.patch
new file mode 100644
index 0000000..04253c9
--- /dev/null
+++ b/gdb-ifunc-unchain.patch
@@ -0,0 +1,39 @@
+commit 8800e981e44d9fb518feab23219447bf5fe7cc92
+Author: Jan Kratochvil <jan.kratochvil at redhat.com>
+Date:   Fri Jan 28 14:25:41 2011 +0100
+
+    Fix breakpoints unchaining.
+    Possibly: https://bugzilla.redhat.com/show_bug.cgi?id=673483
+
+[ Backported.  ]
+
+--- gdb-7.2/gdb/breakpoint.c.orig	2011-01-28 14:31:54.000000000 +0100
++++ gdb-7.2/gdb/breakpoint.c	2011-01-28 14:33:14.000000000 +0100
+@@ -9777,20 +9777,18 @@ delete_breakpoint (struct breakpoint *bp
+      breakpoints gets resolved.  */
+   if (bpt->related_breakpoint != bpt)
+     {
++      struct breakpoint *related;
++
+       if (bpt->type == bp_watchpoint_scope)
+ 	watchpoint_del_at_next_stop (bpt->related_breakpoint);
+       else if (bpt->related_breakpoint->type == bp_watchpoint_scope)
+ 	watchpoint_del_at_next_stop (bpt);
+-      else
+-	{
+-	  struct breakpoint *related;
+ 
+-	  /* Unlink bpt from the bpt->related_breakpoint ring.  */
+-	  for (related = bpt; related->related_breakpoint != bpt;
+-	       related = related->related_breakpoint);
+-	  related->related_breakpoint = bpt->related_breakpoint;
+-	  bpt->related_breakpoint = bpt;
+-	}
++      /* Unlink bpt from the bpt->related_breakpoint ring.  */
++      for (related = bpt; related->related_breakpoint != bpt;
++	   related = related->related_breakpoint);
++      related->related_breakpoint = bpt->related_breakpoint;
++      bpt->related_breakpoint = bpt;
+     }
+ 
+   observer_notify_breakpoint_deleted (bpt->number);
diff --git a/gdb.spec b/gdb.spec
index 0225b78..90a0ef8 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -27,7 +27,7 @@ Version: 7.2
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 37%{?_with_upstream:.upstream}%{dist}
+Release: 38%{?_with_upstream:.upstream}%{dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
 Group: Development/Debuggers
@@ -713,6 +713,9 @@ Patch552: gdb-gdbindex-v4-2of3.patch
 # =drop
 Patch553: gdb-gdbindex-v4-3of3.patch
 
+# [ifunc] Fix possible crash on deleting breakpoints (BZ 673483).
+Patch558: gdb-ifunc-unchain.patch
+
 BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
 Requires: readline%{?_isa}
 BuildRequires: readline-devel%{?_isa}
@@ -1016,6 +1019,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch551 -p1
 %patch552 -p1
 %patch553 -p1
+%patch558 -p1
 
 %patch390 -p1
 %patch393 -p1
@@ -1413,6 +1417,9 @@ fi
 %endif
 
 %changelog
+* Fri Jan 28 2011 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2-38.fc14
+- [ifunc] Fix possible crash on deleting breakpoints (BZ 673483).
+
 * Tue Jan 25 2011 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2-37.fc14
 - Fix discontiguous address ranges in .gdb_index - v3->v4 (BZ 672281).
 


More information about the scm-commits mailing list