public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/9990] New: Command "restore" will cause SEGMENTATION FAULT
@ 2009-03-23 17:43 keith dot walton at spansion dot com
  2009-03-24 17:20 ` [Bug gdb/9990] " drow at sources dot redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: keith dot walton at spansion dot com @ 2009-03-23 17:43 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gdb/9990] Command "restore" will cause SEGMENTATION FAULT
  2009-03-23 17:43 [Bug gdb/9990] New: Command "restore" will cause SEGMENTATION FAULT keith dot walton at spansion dot com
@ 2009-03-24 17:20 ` drow at sources dot redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: drow at sources dot redhat dot com @ 2009-03-24 17:20 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From drow at sources dot redhat dot com  2009-03-24 17:20 -------
Please try a current release of GDB; there is no call to alloca in the memory
write process now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-24 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-23 17:43 [Bug gdb/9990] New: Command "restore" will cause SEGMENTATION FAULT keith dot walton at spansion dot com
2009-03-24 17:20 ` [Bug gdb/9990] " drow at sources dot redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).