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 c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation Date: Sat, 11 Dec 2021 04:58:25 +0000 [thread overview] Message-ID: <bug-103534-4-Lrb6gIVd4V@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103534-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 --- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:2e8067041d1d69da02bd7578f58abc11eb35a04b commit r12-5906-g2e8067041d1d69da02bd7578f58abc11eb35a04b Author: Jason Merrill <jason@redhat.com> Date: Fri Dec 10 11:21:50 2021 -0500 libstdc++: check length in string append [PR103534] In the testcase for 103534 we get a warning about append leading to memcpy of a very large number of bytes overflowing the buffer. This turns out to be because we weren't calling _M_check_length for string append. Rather than do that directly, let's go through the public pointer append that calls it. PR c++/103534 libstdc++-v3/ChangeLog: * include/bits/basic_string.h (append (basic_string)): Call pointer append instead of _M_append directly. gcc/testsuite/ChangeLog: * g++.dg/warn/Wstringop-overflow-8.C: New test.
next prev parent reply other threads:[~2021-12-11 4:58 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-02 19:47 [Bug c++/103534] New: " sss@li-snyder.org 2021-12-02 21:03 ` [Bug c++/103534] " msebor at gcc dot gnu.org 2021-12-02 21:53 ` pinskia at gcc dot gnu.org 2021-12-02 23:02 ` redi at gcc dot gnu.org 2021-12-02 23:19 ` msebor at gcc dot gnu.org 2021-12-06 8:16 ` rguenth at gcc dot gnu.org 2021-12-10 16:29 ` jason at gcc dot gnu.org 2021-12-10 16:30 ` jason at gcc dot gnu.org 2021-12-10 16:37 ` jason at gcc dot gnu.org 2021-12-10 16:53 ` msebor at gcc dot gnu.org 2021-12-10 17:04 ` jakub at gcc dot gnu.org 2021-12-11 4:58 ` cvs-commit at gcc dot gnu.org [this message] 2021-12-13 16:11 ` jason at gcc dot gnu.org 2021-12-13 16:11 ` jason 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-103534-4-Lrb6gIVd4V@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: linkBe 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).