public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Bug libstdc++/112477] [13/14 Regression] Assignment of value-initialized iterators differs from value-initialization
Date: Thu, 11 Jan 2024 18:02:49 +0000	[thread overview]
Message-ID: <CACb0b4ksAatjZw6Lo=oK9ixpvUjj04Dro=Zmcy-SNzAD-fT3fQ@mail.gmail.com> (raw)
In-Reply-To: <cdbd31d8-5898-4d04-838c-62155fadd41c@gmail.com>

On Wed, 10 Jan 2024 at 18:28, François Dumont <frs.dumont@gmail.com> wrote:
>
> libstdc++: [_GLIBCXX_DEBUG] Fix assignment of value-initialized iterator
> [PR112477]
>
> Now that _M_Detach do not reset iterator _M_version value we need to
> reset it when
> the iterator is attached to a new sequence. Even if this sequencer is
> null like when
> assigning a value-initialized iterator. In this case _M_version shall be
> reset to 0.
>
> libstdc++-v3/ChangeLog:
>
>      PR libstdc++/112477
>      * src/c++11/debug.cc
>      (_Safe_iterator_base::_M_attach): Reset _M_version to 0 if
> attaching to null
>      sequence.
>      (_Safe_iterator_base::_M_attach_single): Likewise.
>      (_Safe_local_iterator_base::_M_attach): Likewise.
>      (_Safe_local_iterator_base::_M_attach_single): Likewise.
>      * testsuite/23_containers/map/debug/112477.cc: New test case.
>
> Tested under Linux x64 _GLIBCXX_DEBUG mode.
>
> Ok to commit and backport to gcc 13 ?

Yes please - thanks for the quick fix.


>
> François
>
> On 09/01/2024 22:47, fdumont at gcc dot gnu.org wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112477
> >
> > François Dumont <fdumont at gcc dot gnu.org> changed:
> >
> >             What    |Removed                     |Added
> > ----------------------------------------------------------------------------
> >             Assignee|unassigned at gcc dot gnu.org      |fdumont at gcc dot gnu.org
> >
> > --- Comment #8 from François Dumont <fdumont at gcc dot gnu.org> ---
> > Hi
> > I'm going to have a look but if you wish to contribute do not hesitate.
> > Thanks for the report.
> >


      reply	other threads:[~2024-01-11 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-112477-19885@http.gcc.gnu.org/bugzilla/>
     [not found] ` <bug-112477-19885-GQRgTWr6Ee@http.gcc.gnu.org/bugzilla/>
2024-01-10 18:28   ` François Dumont
2024-01-11 18:02     ` Jonathan Wakely [this message]

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='CACb0b4ksAatjZw6Lo=oK9ixpvUjj04Dro=Zmcy-SNzAD-fT3fQ@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).