This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/9990] New: Command "restore" will cause SEGMENTATION FAULT
- From: "keith dot walton at spansion dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 23 Mar 2009 17:43:38 -0000
- Subject: [Bug gdb/9990] New: Command "restore" will cause SEGMENTATION FAULT
- Reply-to: sourceware-bugzilla at sourceware dot org
If the file passed to the command "restore" is more than 32K in size, the
entire GDB application will generate a SEGMENTATION FAULT. This is because
the function target_write_memory() creates a temporary buffer to copy the data
into before writing it into the target memory. This function uses the
function alloca() to create a buffer in the stack, but does not check the
pointer returned from alloca() to make sure it is valid before passing it on
to memcpy(). The function target_write_memory() should post an error if the
pointer is no good. The documentation for the command "restore" should state
that there is a limit to the amount of data that can be restored. By the way,
the command "dump" is able to dump at least 136K of data. Should "restore" be
able to restore files that were created by "dump"?
--
Summary: Command "restore" will cause SEGMENTATION FAULT
Product: gdb
Version: 6.5
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned at sourceware dot org
ReportedBy: keith dot walton at spansion dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=9990
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.