Package: gdb
Version: 6.8-3
Severity: normal
Tags: patch
While debugging a crashed pan I managed to crash gdb.
To reproduce:
#install pan 0.132-3.1 or possible other versions
#export LANG=sv_SE.UTF-8
#(above required to trigger pan bug)
#gdb pan
#(in gdb)r
#(in pan)post a message or followup somewhere, for example alt.test => pan
crashes
#(in gdb)bt full => gdb crashes
The problem is in gnu-v3-abi.c (and possibly a lot of other places) as there
are no checks for valid pointers in the macro TYPE_VPTR_BASETYPE and friends.
A simple patch that fixes the problem is below. It works for me.
--- gnu-v3-abi.c.orig 2009-01-16 19:49:08.000000000 +0100
+++ gnu-v3-abi.c 2009-01-17 11:08:55.000000000 +0100
@@ -418,6 +418,9 @@
we have debugging information for that baseclass. */
vbasetype = TYPE_VPTR_BASETYPE (type);
+ if (vbasetype!=0 && vbasetype->pointer_type==0)
+ return -1;
+
vbasetype_vptr_fieldno = get_vptr_fieldno (vbasetype, NULL);
if (vbasetype_vptr_fieldno >= 0
/Jörgen
-- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.24
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gdb depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libexpat1 2.0.1-4 XML parsing C library - runtime li
ii libncurses5 5.7+20090110-1 shared libraries for terminal hand
ii libreadline5 5.2-3 GNU readline and history libraries
gdb recommends no packages.
Versions of packages gdb suggests:
pn gdb-doc <none> (no description available)
-- debconf-show failed
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]