public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106093] [12/13 Regression] False positive -Wstringop-overflow with -O3 when resizing std::vector Date: Mon, 16 Jan 2023 10:53:26 +0000 [thread overview] Message-ID: <bug-106093-4-GRQmakslH4@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106093-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106093 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[Regression] False positive |[12/13 Regression] False |-Wstringop-overflow with |positive |-O3 when resizing |-Wstringop-overflow with |std::vector |-O3 when resizing | |std::vector Ever confirmed|0 |1 Last reconfirmed| |2023-01-16 Status|UNCONFIRMED |NEW CC| |jwakely.gcc at gmail dot com Known to work| |11.3.0 Priority|P3 |P2 Target Milestone|--- |12.3 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. (gdb) p debug_gimple_stmt (stmt) # .MEM_120 = VDEF <.MEM_81> MEM <vector(8) char> [(char *)vectp.79_117] = vect__18.77_116; it's possibly a missed optimization for the vectorizer introduced compute of the number of iterations. We have <bb 7> [local count: 58465242]: _23 = operator new (1); *_23 = 0; __cur_29 = _23 + 1; if (_3 != _4) goto <bb 8>; [89.00%] <bb 8> [local count: 52034065]: _15 = (unsigned long) _3; _38 = (unsigned long) _4; _36 = _15 - _38; _54 = _36 + 18446744073709551615; _10 = _54 > 6; if (_10 != 0) goto <bb 9>; [64.00%] so we allocate 1 byte but then compute the iteration as difference from _4 and _3 which are computed from _3 = m_stream.D.31893._M_impl.D.31166._M_finish; _4 = m_stream.D.31893._M_impl.D.31166._M_start; in particular the new allocated storage is processed but the old size is used?!
next prev parent reply other threads:[~2023-01-16 10:53 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-26 21:31 [Bug c++/106093] New: [Regression] " aclopte at gmail dot com 2023-01-16 10:53 ` rguenth at gcc dot gnu.org [this message] 2023-01-16 13:14 ` [Bug tree-optimization/106093] [12/13 Regression] " redi at gcc dot gnu.org 2023-01-16 13:17 ` redi at gcc dot gnu.org 2023-05-08 12:24 ` [Bug tree-optimization/106093] [12/13/14 " rguenth 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-106093-4-GRQmakslH4@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).