* PATCH: extend 'buffer' lifetime to enclose all its uses
@ 2004-09-14 2:52 Jim Blandy
0 siblings, 0 replies; only message in thread
From: Jim Blandy @ 2004-09-14 2:52 UTC (permalink / raw)
To: gdb-patches
Committed as obvious.
2004-09-13 Jim Blandy <jimb@redhat.com>
* valops.c (value_assign): Move 'buffer' to the enclosing block,
so that its storage isn't referenced after its lifetime ends.
Index: gdb/valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.129
diff -c -p -r1.129 valops.c
*** gdb/valops.c 3 Aug 2004 00:57:27 -0000 1.129
--- gdb/valops.c 14 Sep 2004 02:47:56 -0000
*************** value_assign (struct value *toval, struc
*** 569,578 ****
char *dest_buffer;
CORE_ADDR changed_addr;
int changed_len;
if (VALUE_BITSIZE (toval))
{
- char buffer[sizeof (LONGEST)];
/* We assume that the argument to read_memory is in units of
host chars. FIXME: Is that correct? */
changed_len = (VALUE_BITPOS (toval)
--- 569,578 ----
char *dest_buffer;
CORE_ADDR changed_addr;
int changed_len;
+ char buffer[sizeof (LONGEST)];
if (VALUE_BITSIZE (toval))
{
/* We assume that the argument to read_memory is in units of
host chars. FIXME: Is that correct? */
changed_len = (VALUE_BITPOS (toval)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-14 2:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-14 2:52 PATCH: extend 'buffer' lifetime to enclose all its uses Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox