This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/13259] New: gdb sometimes crashes with SIGSEGV whenprinting variables
- From: "martin.runge at web dot de" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 05 Oct 2011 13:48:32 +0000
- Subject: [Bug gdb/13259] New: gdb sometimes crashes with SIGSEGV whenprinting variables
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13259
Bug #: 13259
Summary: gdb sometimes crashes with SIGSEGV when printing
variables
Product: gdb
Version: 7.3
Status: NEW
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned@sourceware.org
ReportedBy: martin.runge@web.de
Classification: Unclassified
When trying to print a variable's value, gdb can crash with NULL pointer deref
in some cases here:
gdb/varobj.c (line 2643 in gdb 7.3.1)
static char *
value_get_print_value (struct value *value, enum varobj_display_formats format,
struct varobj *var)
....
else if (string_print)
val_print_string (type, encoding, str_addr, len, stb, &opts);
....
I have seen some cases, where "type" was still NULL, but "string_print" != 0.
I think val_print_string should only be called, if "type" was resolved before.
If type is still NULL, use val_print_common instead.
I'll send a patch to gdb-patches.
Seen in 7.3.0, 7.3.1 and still present in current snapshot 20111005.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.