diff --git a/gdb-bz600746-koenig-crash.patch b/gdb-bz600746-koenig-crash.patch new file mode 100644 index 0000000..7b6e209 --- /dev/null +++ b/gdb-bz600746-koenig-crash.patch @@ -0,0 +1,66 @@ +[patch] Fix ADL anonymous type crash +http://sourceware.org/ml/gdb-patches/2010-06/msg00004.html +http://sourceware.org/ml/gdb-cvs/2010-06/msg00012.html + +[ Backported the testcase. ] + +### src/gdb/ChangeLog 2010/06/02 06:24:00 1.11862 +### src/gdb/ChangeLog 2010/06/02 15:31:29 1.11863 +## -1,3 +1,8 @@ ++2010-06-02 Sami Wagiaalla ++ ++ * cp-support.c (make_symbol_overload_list_adl_namespace): Handle ++ anonymous type case. ++ + 2010-06-02 Pierre Muller + + * dwarf2read.c (read_subrange_type): Handle missing base type +### src/gdb/testsuite/ChangeLog 2010/06/01 21:29:21 1.2298 +### src/gdb/testsuite/ChangeLog 2010/06/02 15:31:30 1.2299 +## -1,3 +1,8 @@ ++2010-06-02 Sami Wagiaalla ++ ++ * gdb.cp/namespace-koenig.exp: Added new test case. ++ * gdb.cp/namespace-koenig.cc: Ditto. ++ + 2010-06-01 Michael Snyder + + * gdb.base/arithmet.exp: Use gdb_test_no_output. +--- src/gdb/cp-support.c 2010/05/13 23:53:32 1.40 ++++ src/gdb/cp-support.c 2010/06/02 15:31:30 1.41 +@@ -752,6 +752,9 @@ + + type_name = TYPE_NAME (type); + ++ if (type_name == NULL) ++ return; ++ + prefix_len = cp_entire_prefix_len (type_name); + + if (prefix_len != 0) +--- gdb-7.1/gdb/testsuite/gdb.cp/namespace-koenig.cc.orig 2010-06-09 08:20:14.000000000 +0200 ++++ gdb-7.1/gdb/testsuite/gdb.cp/namespace-koenig.cc 2010-06-09 11:09:29.000000000 +0200 +@@ -165,6 +165,13 @@ namespace M { + + } + //------------ ++static union { ++ int a; ++ char b; ++}p_union; ++ ++//------------ ++ + int + main () + { +--- gdb-7.1/gdb/testsuite/gdb.cp/namespace-koenig.exp.orig 2010-06-09 08:20:14.000000000 +0200 ++++ gdb-7.1/gdb/testsuite/gdb.cp/namespace-koenig.exp 2010-06-09 11:09:48.000000000 +0200 +@@ -110,3 +111,7 @@ gdb_test "p o + 5.0f" "= 22" + gdb_test "p o + 5" "= 23" + + gdb_test "p o++" "= 24" ++ ++#test that lookup is not thwarted by anonymous types ++gdb_test "p foo (p_union)" \ ++ "Cannot resolve function foo to any overloaded instance" diff --git a/gdb.spec b/gdb.spec index efde5e6..75166c1 100644 --- a/gdb.spec +++ b/gdb.spec @@ -36,7 +36,7 @@ Version: 7.1 # 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: 24%{?_with_upstream:.upstream}%{dist} +Release: 25%{?_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 @@ -499,6 +499,9 @@ Patch471: gdb-bz589467-pieces-vla-compat.patch # Fix follow-exec for C++ programs (bugreported by Martin Stransky). Patch470: gdb-archer-next-over-throw-cxx-exec.patch +# Fix ADL anonymous type crash (BZ 600746, Sami Wagiaalla). +Patch472: gdb-bz600746-koenig-crash.patch + BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa} Requires: readline%{?_isa} BuildRequires: readline-devel%{?_isa} @@ -785,6 +788,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c %patch469 -p1 %patch471 -p1 %patch470 -p1 +%patch472 -p1 %patch415 -p1 %patch393 -p1 @@ -1117,6 +1121,9 @@ fi %endif %changelog +* Wed Jun 9 2010 Jan Kratochvil - 7.1-25.fc13 +- Fix ADL anonymous type crash (BZ 600746, Sami Wagiaalla). + * Tue Jun 1 2010 Jan Kratochvil - 7.1-24.fc13 - Fix crash on /proc/PID/stat race during inferior exit (BZ 596751). - testsuite: gdb.threads/watchthreads-reorder.exp kernel-2.6.33 compat. fix.