rpms/gdb/devel gdb-c_get_string-xfree.patch, NONE, 1.1 gdb.spec, 1.342, 1.343
Jan Kratochvil
jkratoch at fedoraproject.org
Tue Apr 14 22:18:29 UTC 2009
- Previous message (by thread): rpms/kernel/devel alsa-dont-reset-stream-at-each-prepare-callb.patch, NONE, 1.1.2.1 alsa-hda-dont-reset-BDL-unnecessarily.patch, NONE, 1.1.2.1 alsa-hda_intel-fix-unexpected-ring-buffer-positio.patch, NONE, 1.1.2.1 alsa-pcm-midlevel-add-more-strict-buffer-position.patch, NONE, 1.1.2.1 drm-intel-gen3-fb-hack.patch, NONE, 1.1.2.1 drm-intel-lying-systems-without-lvds.patch, NONE, 1.1.2.1 linux-2.6-acer-wmi-bail-on-aao.patch, NONE, 1.1.2.1 linux-2.6-add-qcserial.patch, NONE, 1.1.2.1 linux-2.6-btrfs-fix-umount-hang.patch, NONE, 1.2.2.2 linux-2.6-crash-driver.patch, 1.12.6.2, 1.12.6.3 linux-2.6-dma-debug-fixes.patch, NONE, 1.1.2.1 linux-2.6-e820-acpi3-bios-workaround.patch, NONE, 1.1.2.1 linux-2.6-e820-guard-against-pre-acpi3.patch, NONE, 1.1.2.1 linux-2.6-e820-mark-esi-clobbered.patch, NONE, 1.1.2.1 linux-2.6-e820-save-restore-edi-ebp.patch, NONE, 1.1.2.1 linux-2.6-ext4-really-print-warning-once.patch, NONE, 1.1.2.1 linux-2.6-fiemap-header-install.patch, NONE, 1.2.2.2 linux-2.6-input-wacom-bluetooth.patch, NONE, 1.1.2.1 linux-2.6-iommu-fixes.patch, NONE, 1.1.2.1 linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch, NONE, 1.1.2.1 linux-2.6-iwlagn-fix-hw-rfkill-while-the-interface-is-down.patch, NONE, 1.1.2.1 linux-2.6-kvm-kconfig-irqchip.patch, NONE, 1.1.2.1 linux-2.6-kvm-mask-notifiers.patch, NONE, 1.1.2.1 linux-2.6-kvm-reset-pit-irq-on-unmask.patch, NONE, 1.1.2.1 linux-2.6-md-raid1-dont-assume-new-bvecs-are-init.patch, NONE, 1.1.2.1 linux-2.6-mm-define-unique-value-for-as_unevictable.patch, NONE, 1.1.2.1 linux-2.6-posix-timers-fix-clock-monotonicity.patch, NONE, 1.1.2.1 linux-2.6-posix-timers-fix-rlimit_cpu-fork-2.patch, NONE, 1.1.2.1 linux-2.6-posix-timers-fix-rlimit_cpu-fork.patch, NONE, 1.1.2.1 linux-2.6-posix-timers-fix-rlimit_cpu-setitimer.patch, NONE, 1.1.2.1 linux-2.6-shut-up-efifb.patch, NONE, 1.1.2.1 linux-2.6-usb-cdc-acm-remove-low-latency-flag.patch, NONE, 1.1.2.1 linux-2.6-v4l-dvb-fix-uint16_t-audio-h.patch, NONE, 1.1.2.1 linux-2.6.29-alsa-update-quirks.patch, NONE, 1.1.2.1 linux-2.6.29.1-sparc-regression.patch, NONE, 1.1.2.1 patch-2.6.29.1.bz2.sign, NONE, 1.1.2.1 squashfs-broken-when-pagesize-greater-than-blocksize.patch, NONE, 1.1.2.1 .cvsignore, 1.1014.2.8, 1.1014.2.9 Makefile, 1.97.6.2, 1.97.6.3 TODO, 1.54.6.4, 1.54.6.5 branch, 1.1.2.1, 1.1.2.2 config-debug, 1.23, 1.23.6.1 config-generic, 1.238.6.15, 1.238.6.16 config-nodebug, 1.31, 1.31.6.1 config-sparc64-generic, 1.21.6.1, 1.21.6.2 config-sparc64-smp, 1.2, 1.2.16.1 config-x86-generic, 1.68.6.5, 1.68.6.6 config-x86_64-generic, 1.68.2.5, 1.68.2.6 drm-modesetting-radeon.patch, 1.54.6.7, 1.54.6.8 drm-next.patch, 1.6.6.5, 1.6.6.6 drm-nouveau.patch, 1.8.6.8, 1.8.6.9 kernel.spec, 1.1294.2.18, 1.1294.2.19 linux-2.6-acpi-video-didl-intel-outputs.patch, 1.1.2.3, 1.1.2.4 linux-2.6-sony-laptop-rfkill.patch, 1.2.6.2, 1.2.6.3 linux-2.6-v4l-dvb-fixes.patch, 1.2.8.7, 1.2.8.8 sources, 1.976.2.9, 1.976.2.10 upstream, 1.888.2.8, 1.888.2.9 xen.pvops.patch, 1.1.2.15, 1.1.2.16 xen.pvops.post.patch, 1.1.2.9, 1.1.2.10 xen.pvops.pre.patch, 1.1.2.8, 1.1.2.9 dma-api-debug-fixes.patch, 1.1.6.2, NONE linux-2.6-debug-dma-api.patch, 1.2.6.1, NONE linux-2.6-net-fix-gro-bug.patch, 1.1.2.2, NONE linux-2.6-net-xfrm-fix-spin-unlock.patch, 1.1.2.2, NONE linux-2.6.29-pat-fixes.patch, 1.1.2.2, NONE squashfs-fixups.patch, 1.1.2.1, NONE squashfs3.patch, 1.1.2.1, NONE
- Next message (by thread): rpms/openoffice.org-extendedPDF/F-10 openoffice.org-extendedPDF-1.4.0-oooVersion.patch, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jkratoch
Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14888
Modified Files:
gdb.spec
Added Files:
gdb-c_get_string-xfree.patch
Log Message:
* 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).
gdb-c_get_string-xfree.patch:
--- NEW FILE gdb-c_get_string-xfree.patch ---
http://sourceware.org/ml/gdb-patches/2009-04/msg00284.html
http://sourceware.org/ml/gdb-cvs/2009-04/msg00077.html
http://sourceware.org/ml/archer/2009-q2/msg00049.html
gdb/
2009-04-14 Jan Kratochvil <jan.kratochvil at redhat.com>
* c-lang.c (c_get_string): Fix xfree crash on a failed string read.
gdb/testsuite/
2009-04-14 Jan Kratochvil <jan.kratochvil at redhat.com>
* gdb.python/python-prettyprint.c: Include <string.h>.
(struct nullstr): New.
(main): New variable `nullstr'. Clear it.
* gdb.python/python-prettyprint.exp (run_lang_tests): Test `nullstr'.
* gdb.python/python-prettyprint.py (class pp_nullstr): New.
(register_pretty_printers): Register `pp_nullstr'.
--- src/gdb/c-lang.c 2009/03/21 00:46:17 1.63
+++ src/gdb/c-lang.c 2009/04/14 21:54:33 1.64
@@ -657,7 +657,7 @@
buffer, length);
if (err)
{
- xfree (buffer);
+ xfree (*buffer);
error (_("Error reading string from inferior: %s"),
safe_strerror (err));
}
diff --git a/gdb/testsuite/gdb.python/python-prettyprint.c b/gdb/testsuite/gdb.python/python-prettyprint.c
index 399be23..0d9110d 100644
--- a/gdb/testsuite/gdb.python/python-prettyprint.c
+++ b/gdb/testsuite/gdb.python/python-prettyprint.c
@@ -15,6 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include <string.h>
+
struct s
{
int a;
@@ -143,6 +145,11 @@ void do_nothing(void)
c = 23; /* Another MI breakpoint */
}
+struct nullstr
+{
+ char *s;
+};
+
int
main ()
{
@@ -151,10 +158,13 @@ main ()
string x = make_string ("this is x");
zzz_type c = make_container ("container");
const struct string_repr cstring = { { "const string" } };
+ /* Clearing by being `static' could invoke an other GDB C++ bug. */
+ struct nullstr nullstr;
init_ss(&ss, 1, 2);
init_ss(ssa+0, 3, 4);
init_ss(ssa+1, 5, 6);
+ memset (&nullstr, 0, sizeof nullstr);
#ifdef __cplusplus
S cps;
diff --git a/gdb/testsuite/gdb.python/python-prettyprint.exp b/gdb/testsuite/gdb.python/python-prettyprint.exp
index f83b1cd..907dcfd 100644
--- a/gdb/testsuite/gdb.python/python-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/python-prettyprint.exp
@@ -85,6 +85,8 @@ proc run_lang_tests {lang} {
gdb_test "print c" " = container $hex \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}"
+ gdb_test "print nullstr" "RuntimeError: Error reading string from inferior.*"
+
gdb_test "continue" "Program exited normally\."
}
diff --git a/gdb/testsuite/gdb.python/python-prettyprint.py b/gdb/testsuite/gdb.python/python-prettyprint.py
index a53e412..82e5331 100644
--- a/gdb/testsuite/gdb.python/python-prettyprint.py
+++ b/gdb/testsuite/gdb.python/python-prettyprint.py
@@ -92,6 +92,13 @@ class pp_vbase1:
def to_string (self):
return "pp class name: " + self.val.type.tag
+class pp_nullstr:
+ def __init__(self, val):
+ self.val = val
+
+ def to_string(self):
+ return self.val['s'].string(gdb.parameter('target-charset'))
+
def lookup_function (val):
"Look-up and return a pretty-printer that can print val."
@@ -135,6 +142,9 @@ def register_pretty_printers ():
pretty_printers_dict[re.compile ('^VirtualTest$')] = pp_multiple_virtual
pretty_printers_dict[re.compile ('^Vbase1$')] = pp_vbase1
+
+ pretty_printers_dict[re.compile ('^struct nullstr$')] = pp_nullstr
+ pretty_printers_dict[re.compile ('^nullstr$')] = pp_nullstr
# Note that we purposely omit the typedef names here.
# Printer lookup is based on canonical name.
Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.342
retrieving revision 1.343
diff -u -r1.342 -r1.343
--- gdb.spec 13 Apr 2009 21:25:31 -0000 1.342
+++ gdb.spec 14 Apr 2009 22:17:59 -0000 1.343
@@ -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: 18%{?_with_upstream:.upstream}%{?dist}
+Release: 19%{?_with_upstream:.upstream}%{?dist}
License: GPLv3+
Group: Development/Debuggers
@@ -375,6 +375,9 @@
# - Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE.
Patch352: gdb-6.8-bz457187-largefile.patch
+# Fix crash on pretty-printer reading uninitialized std::string (BZ 495781).
+Patch357: gdb-c_get_string-xfree.patch
+
BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
Requires: readline
BuildRequires: readline-devel
@@ -569,6 +572,7 @@
%patch343 -p1
%patch348 -p1
%patch352 -p1
+%patch357 -p1
%patch124 -p1
find -name "*.orig" | xargs rm -f
@@ -851,6 +855,9 @@
%endif
%changelog
+* 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).
+
* Mon Apr 13 2009 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8.50.20090302-18
- Archer update to the snapshot: d1fee5066408a09423621d1ebc64e6d3e248ed08
- Archer backport: 4854339f75bdaf4b228fc35579bddbb2a1fecdc1
- Previous message (by thread): rpms/kernel/devel alsa-dont-reset-stream-at-each-prepare-callb.patch, NONE, 1.1.2.1 alsa-hda-dont-reset-BDL-unnecessarily.patch, NONE, 1.1.2.1 alsa-hda_intel-fix-unexpected-ring-buffer-positio.patch, NONE, 1.1.2.1 alsa-pcm-midlevel-add-more-strict-buffer-position.patch, NONE, 1.1.2.1 drm-intel-gen3-fb-hack.patch, NONE, 1.1.2.1 drm-intel-lying-systems-without-lvds.patch, NONE, 1.1.2.1 linux-2.6-acer-wmi-bail-on-aao.patch, NONE, 1.1.2.1 linux-2.6-add-qcserial.patch, NONE, 1.1.2.1 linux-2.6-btrfs-fix-umount-hang.patch, NONE, 1.2.2.2 linux-2.6-crash-driver.patch, 1.12.6.2, 1.12.6.3 linux-2.6-dma-debug-fixes.patch, NONE, 1.1.2.1 linux-2.6-e820-acpi3-bios-workaround.patch, NONE, 1.1.2.1 linux-2.6-e820-guard-against-pre-acpi3.patch, NONE, 1.1.2.1 linux-2.6-e820-mark-esi-clobbered.patch, NONE, 1.1.2.1 linux-2.6-e820-save-restore-edi-ebp.patch, NONE, 1.1.2.1 linux-2.6-ext4-really-print-warning-once.patch, NONE, 1.1.2.1 linux-2.6-fiemap-header-install.patch, NONE, 1.2.2.2 linux-2.6-input-wacom-bluetooth.patch, NONE, 1.1.2.1 linux-2.6-iommu-fixes.patch, NONE, 1.1.2.1 linux-2.6-iwl3945-report-killswitch-changes-even-if-the-interface-is-down.patch, NONE, 1.1.2.1 linux-2.6-iwlagn-fix-hw-rfkill-while-the-interface-is-down.patch, NONE, 1.1.2.1 linux-2.6-kvm-kconfig-irqchip.patch, NONE, 1.1.2.1 linux-2.6-kvm-mask-notifiers.patch, NONE, 1.1.2.1 linux-2.6-kvm-reset-pit-irq-on-unmask.patch, NONE, 1.1.2.1 linux-2.6-md-raid1-dont-assume-new-bvecs-are-init.patch, NONE, 1.1.2.1 linux-2.6-mm-define-unique-value-for-as_unevictable.patch, NONE, 1.1.2.1 linux-2.6-posix-timers-fix-clock-monotonicity.patch, NONE, 1.1.2.1 linux-2.6-posix-timers-fix-rlimit_cpu-fork-2.patch, NONE, 1.1.2.1 linux-2.6-posix-timers-fix-rlimit_cpu-fork.patch, NONE, 1.1.2.1 linux-2.6-posix-timers-fix-rlimit_cpu-setitimer.patch, NONE, 1.1.2.1 linux-2.6-shut-up-efifb.patch, NONE, 1.1.2.1 linux-2.6-usb-cdc-acm-remove-low-latency-flag.patch, NONE, 1.1.2.1 linux-2.6-v4l-dvb-fix-uint16_t-audio-h.patch, NONE, 1.1.2.1 linux-2.6.29-alsa-update-quirks.patch, NONE, 1.1.2.1 linux-2.6.29.1-sparc-regression.patch, NONE, 1.1.2.1 patch-2.6.29.1.bz2.sign, NONE, 1.1.2.1 squashfs-broken-when-pagesize-greater-than-blocksize.patch, NONE, 1.1.2.1 .cvsignore, 1.1014.2.8, 1.1014.2.9 Makefile, 1.97.6.2, 1.97.6.3 TODO, 1.54.6.4, 1.54.6.5 branch, 1.1.2.1, 1.1.2.2 config-debug, 1.23, 1.23.6.1 config-generic, 1.238.6.15, 1.238.6.16 config-nodebug, 1.31, 1.31.6.1 config-sparc64-generic, 1.21.6.1, 1.21.6.2 config-sparc64-smp, 1.2, 1.2.16.1 config-x86-generic, 1.68.6.5, 1.68.6.6 config-x86_64-generic, 1.68.2.5, 1.68.2.6 drm-modesetting-radeon.patch, 1.54.6.7, 1.54.6.8 drm-next.patch, 1.6.6.5, 1.6.6.6 drm-nouveau.patch, 1.8.6.8, 1.8.6.9 kernel.spec, 1.1294.2.18, 1.1294.2.19 linux-2.6-acpi-video-didl-intel-outputs.patch, 1.1.2.3, 1.1.2.4 linux-2.6-sony-laptop-rfkill.patch, 1.2.6.2, 1.2.6.3 linux-2.6-v4l-dvb-fixes.patch, 1.2.8.7, 1.2.8.8 sources, 1.976.2.9, 1.976.2.10 upstream, 1.888.2.8, 1.888.2.9 xen.pvops.patch, 1.1.2.15, 1.1.2.16 xen.pvops.post.patch, 1.1.2.9, 1.1.2.10 xen.pvops.pre.patch, 1.1.2.8, 1.1.2.9 dma-api-debug-fixes.patch, 1.1.6.2, NONE linux-2.6-debug-dma-api.patch, 1.2.6.1, NONE linux-2.6-net-fix-gro-bug.patch, 1.1.2.2, NONE linux-2.6-net-xfrm-fix-spin-unlock.patch, 1.1.2.2, NONE linux-2.6.29-pat-fixes.patch, 1.1.2.2, NONE squashfs-fixups.patch, 1.1.2.1, NONE squashfs3.patch, 1.1.2.1, NONE
- Next message (by thread): rpms/openoffice.org-extendedPDF/F-10 openoffice.org-extendedPDF-1.4.0-oooVersion.patch, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list