public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/112491] std::deque<T,Allocator>::size xmethod output is wrong
Date: Tue, 14 Nov 2023 22:40:06 +0000	[thread overview]
Message-ID: <bug-112491-4-Rsf77zvvNJ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112491-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112491

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:5cb055e99d2026c734602ffdc28cb8b357a7b28e

commit r13-8066-g5cb055e99d2026c734602ffdc28cb8b357a7b28e
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 14 15:08:13 2023 +0000

    libstdc++: Fix std::deque::size() Xmethod [PR112491]

    The Xmethod for std::deque::size() assumed that the first element would
    be at the start of the first node. That's only true if elements are only
    added at the back. If an element is inserted at the front, or removed
    from the front (or anywhere before the middle) then the first node will
    not be completely populated, and the Xmethod will give the wrong result.

    libstdc++-v3/ChangeLog:

            PR libstdc++/112491
            * python/libstdcxx/v6/xmethods.py (DequeWorkerBase.size): Fix
            calculation to use _M_start._M_cur.
            * testsuite/libstdc++-xmethods/deque.cc: Check failing cases.

    (cherry picked from commit 4db820928065eccbeb725406450d826186582b9f)

  parent reply	other threads:[~2023-11-14 22:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-12 12:21 [Bug libstdc++/112491] New: " ks1322 at gmail dot com
2023-11-14  8:22 ` [Bug libstdc++/112491] " redi at gcc dot gnu.org
2023-11-14 14:56 ` redi at gcc dot gnu.org
2023-11-14 15:13 ` redi at gcc dot gnu.org
2023-11-14 15:58 ` cvs-commit at gcc dot gnu.org
2023-11-14 22:40 ` cvs-commit at gcc dot gnu.org [this message]
2023-11-14 22:43 ` cvs-commit at gcc dot gnu.org
2023-11-14 23:11 ` cvs-commit at gcc dot gnu.org
2023-11-14 23:12 ` redi at gcc dot gnu.org
2023-11-15 10:04 ` redi at gcc dot gnu.org
2023-11-15 11:28 ` cvs-commit at gcc dot gnu.org
2023-11-15 11:33 ` cvs-commit at gcc dot gnu.org
2023-11-15 11:35 ` cvs-commit at gcc dot gnu.org
2023-11-15 11:42 ` cvs-commit at gcc dot gnu.org
2023-11-15 11:44 ` redi at gcc dot gnu.org

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=bug-112491-4-Rsf77zvvNJ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).