From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: extend 'buffer' lifetime to enclose all its uses
Date: Tue, 14 Sep 2004 02:52:00 -0000 [thread overview]
Message-ID: <vt2r7p55zqp.fsf@zenia.home> (raw)
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)
reply other threads:[~2004-09-14 2:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vt2r7p55zqp.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox