rpms/gdb/devel gdb-charset-crash.patch, NONE, 1.1 gdb.spec, 1.343, 1.344

Jan Kratochvil jkratoch at fedoraproject.org
Thu Apr 16 19:09:40 UTC 2009


Author: jkratoch

Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4662

Modified Files:
	gdb.spec 
Added Files:
	gdb-charset-crash.patch 
Log Message:
* Thu Apr 16 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090302-20
- Fix crash in the charset support.


gdb-charset-crash.patch:

--- NEW FILE gdb-charset-crash.patch ---
http://sourceware.org/ml/gdb-patches/2009-04/msg00356.html
http://sourceware.org/ml/gdb-cvs/2009-04/msg00081.html

gdb/
2009-04-15  Tom Tromey  <tromey at redhat.com>

	* c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.

gdb/testsuite/
2009-04-15  Tom Tromey  <tromey at redhat.com>

	* gdb.base/charset.exp: Add regression test.

--- src/gdb/c-lang.c	2009/04/14 21:54:33	1.64
+++ src/gdb/c-lang.c	2009/04/15 21:55:04	1.65
@@ -941,7 +941,15 @@
 	*pos += 2;
 
 	if (noside == EVAL_SKIP)
-	  return NULL;
+	  {
+	    /* Return a dummy value of the appropriate type.  */
+	    if ((dest_type & C_CHAR) != 0)
+	      result = allocate_value (type);
+	    else
+	      result = value_typed_string ("", 0, type);
+	    do_cleanups (cleanup);
+	    return result;
+	  }
 
 	if ((dest_type & C_CHAR) != 0)
 	  {
--- src/gdb/testsuite/gdb.base/charset.exp	2009/03/25 19:25:49	1.13
+++ src/gdb/testsuite/gdb.base/charset.exp	2009/04/15 21:55:04	1.14
@@ -604,4 +604,9 @@
     test_combination u UCS-2 U UCS-4
 }
 
+# Regression test for a cleanup bug in the charset code.
+gdb_test "print 'a' == 'a' || 'b' == 'b'" \
+  ".* = 1" \
+  "EVAL_SKIP cleanup handling regression test"
+
 gdb_exit 


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -r1.343 -r1.344
--- gdb.spec	14 Apr 2009 22:17:59 -0000	1.343
+++ gdb.spec	16 Apr 2009 19:09:09 -0000	1.344
@@ -13,7 +13,7 @@
 
 # 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: 19%{?_with_upstream:.upstream}%{?dist}
+Release: 20%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -378,6 +378,9 @@
 # Fix crash on pretty-printer reading uninitialized std::string (BZ 495781).
 Patch357: gdb-c_get_string-xfree.patch
 
+# Fix crash in the charset support.
+Patch359: gdb-charset-crash.patch
+
 BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
 Requires: readline
 BuildRequires: readline-devel
@@ -573,6 +576,7 @@
 %patch348 -p1
 %patch352 -p1
 %patch357 -p1
+%patch359 -p1
 %patch124 -p1
 
 find -name "*.orig" | xargs rm -f
@@ -855,6 +859,9 @@
 %endif
 
 %changelog
+* Thu Apr 16 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090302-20
+- Fix crash in the charset support.
+
 * Wed Apr 15 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090302-19
 - Fix crash on pretty-printer reading uninitialized std::string (BZ 495781).
 




More information about the scm-commits mailing list