From: Pierre Muller <muller@ics.u-strasbg.fr>
To: gdb-patches@sources.redhat.com
Subject: [RFA] Fix an error in value_change_enclosing_type
Date: Mon, 07 Oct 2002 04:37:00 -0000 [thread overview]
Message-ID: <5.0.2.1.2.20021007132114.01e66260@ics.u-strasbg.fr> (raw)
the function value_change_enclosing_type
does not set the enlclosing_type field correctly if
the new_encl_type has a bigger length that the value type.
Its seems quite astonishing that this has not been noticed before,
but I discovered it when trying to get
the fpc-abi.c code to work correctly.
ChangeLog entry:
2002-10-07 Pierre Muller <muller@ics.u-strasbg.fr>
* values.c (value_change_enclosing_type): Set
enclosing_type field correctly also for the case where
more memory needs to be allocated.
$ cvs diff -u -p values.c
Index: values.c
===================================================================
RCS file: /cvs/src/src/gdb/values.c,v
retrieving revision 1.41
diff -u -p -r1.41 values.c
--- values.c 18 Sep 2002 15:43:47 -0000 1.41
+++ values.c 7 Oct 2002 11:36:15 -0000
@@ -862,7 +862,9 @@ value_change_enclosing_type (struct valu
struct value *prev;
new_val = (struct value *) xrealloc (val, sizeof (struct value) + TYPE_LENGTH (new_encl_type));
-
+
+ VALUE_ENCLOSING_TYPE (new_val) = new_encl_type;
+
/* We have to make sure this ends up in the same place in the value
chain as the original copy, so it's clean-up behavior is the same.
If the value has been released, this is a waste of time, but there
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
next reply other threads:[~2002-10-07 11:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-07 4:37 Pierre Muller [this message]
2002-10-18 14:08 ` Elena Zannoni
2002-10-20 14:55 ` muller
2002-10-22 14:42 ` Elena Zannoni
2002-10-29 1:07 ` Pierre Muller
2002-11-03 16:09 ` Elena Zannoni
2002-11-05 0:26 ` Pierre Muller
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=5.0.2.1.2.20021007132114.01e66260@ics.u-strasbg.fr \
--to=muller@ics.u-strasbg.fr \
--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