Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Reinitialize objfile::section_offsets during objfile reload
Date: Mon, 27 Jan 2020 20:32:00 -0000	[thread overview]
Message-ID: <62d7db58-b5c4-19ff-f4b5-c019ae310c28@redhat.com> (raw)
In-Reply-To: <871rrm6v9r.fsf@tromey.com>

On 1/26/20 4:24 PM, Tom Tromey wrote:
> Andrew> When building and testing with '-D_GLIBCXX_DEBUG=1' I noticed that the
> Andrew> test gdb.base/reload.exp was failing.  This turns out to be because
> Andrew> the objfile::section_offsets vector is not reinitialilzed during the
> Andrew> objfile reload process, and in this particular test, GDB ends up
> Andrew> indexing outside the bounds of the vector.
> 
> Tom> Thanks for catching this.
> 
> I wonder if this is a regression due to 
> 
> commit 6a053cb1ff643cec3349d7f2f47ae5573f82d613
> Author: Tom Tromey <tromey@adacore.com>
> Date:   Mon Jan 6 14:34:52 2020 -0700
> 
>     Change section_offsets to a std::vector
> 
> See appended.
> 
> I think at the time I thought removing this code would simply preserve
> the offsets.  But maybe we instead should std::move the offsets out of
> the objfile and then move them back in?

+1.  Losing the user-specified offsets sounds nasty.

Thanks,
Pedro Alves


  reply	other threads:[~2020-01-27 19:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 11:31 Andrew Burgess
2020-01-26 16:33 ` Tom Tromey
2020-01-26 21:51   ` Tom Tromey
2020-01-27 20:32     ` Pedro Alves [this message]
2020-01-27 19:07   ` Pedro Alves

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=62d7db58-b5c4-19ff-f4b5-c019ae310c28@redhat.com \
    --to=palves@redhat.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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