Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: Daniel Berlin <dan@cgsoftware.com>
Cc: gdb@sources.redhat.com
Subject: Funky code in gnuv2_virtual_fn_field
Date: Sun, 20 May 2001 13:06:00 -0000	[thread overview]
Message-ID: <20010520160159.3484E5E9DB@zwingli.cygnus.com> (raw)

I'm looking at lines 112--118 in gnu-v2-abi.c:

  if (TYPE_TARGET_TYPE (context) != type1)
    {
      value_ptr tmp = value_cast (context, value_addr (arg1));
      VALUE_POINTED_TO_OFFSET (tmp) = 0;
      arg1 = value_ind (tmp);
      type1 = check_typedef (VALUE_TYPE (arg1));
    }

This looks fishy to me.  If we smash the POINTED_TO_OFFSET without
smashing the ENCLOSING_TYPE in a corresponding manner, and then we
indirect through that pointer, don't we get a value whose
ENCLOSING_TYPE is set, but whose address points to the embedded
object, and not the enclosing object?


             reply	other threads:[~2001-05-20 13:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-20 13:06 Jim Blandy [this message]
2001-05-21 18:01 ` Daniel Berlin
2001-05-22 14:16   ` RFA: " Jim Blandy
2001-05-23 21:24     ` Daniel Berlin

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=20010520160159.3484E5E9DB@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=dan@cgsoftware.com \
    --cc=gdb@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