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 middle-end/97027] missing warning on buffer overflow storing a larger scalar into a smaller array Date: Thu, 15 Jul 2021 19:16:32 +0000 [thread overview] Message-ID: <bug-97027-4-zuM05vo4oU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97027-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97027 --- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>: https://gcc.gnu.org/g:f0500db3692276f60e0562c17c87a0cb03e34398 commit r12-2338-gf0500db3692276f60e0562c17c87a0cb03e34398 Author: Martin Sebor <msebor@redhat.com> Date: Thu Jul 15 13:15:03 2021 -0600 Detect buffer overflow by aggregate and vector stores [PR97027]. Resolves: PR middle-end/97027 - missing warning on buffer overflow storing a larger scalar into a smaller array gcc/ChangeLog: PR middle-end/97027 * tree-ssa-strlen.c (handle_assign): New function. (maybe_warn_overflow): Add argument. (nonzero_bytes_for_type): New function. (count_nonzero_bytes): Handle more tree types. Call nonzero_bytes_for_tye. (count_nonzero_bytes): Handle types. (handle_store): Handle stores from function calls. (strlen_check_and_optimize_call): Move code to handle_assign. Call it for assignments from function calls. gcc/testsuite/ChangeLog: PR middle-end/97027 * gcc.dg/Wstringop-overflow-15.c: Remove an xfail. * gcc.dg/Wstringop-overflow-47.c: Adjust xfails. * gcc.dg/torture/pr69170.c: Avoid valid warnings. * gcc.dg/torture/pr70025.c: Prune out a false positive. * gcc.dg/vect/pr97769.c: Initialize a loop control variable. * gcc.target/i386/pr92658-avx512bw-trunc.c: Increase buffer size to avoid overflow. * gcc.target/i386/pr92658-avx512f.c: Same. * gcc.dg/Wstringop-overflow-68.c: New test. * gcc.dg/Wstringop-overflow-69.c: New test. * gcc.dg/Wstringop-overflow-70.c: New test. * gcc.dg/Wstringop-overflow-71.c: New test. * gcc.dg/strlenopt-95.c: New test.
next prev parent reply other threads:[~2021-07-15 19:16 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-11 21:10 [Bug middle-end/97027] New: " msebor at gcc dot gnu.org 2020-10-13 16:53 ` [Bug middle-end/97027] " msebor at gcc dot gnu.org 2020-10-13 16:55 ` msebor at gcc dot gnu.org 2020-10-13 19:07 ` msebor at gcc dot gnu.org 2021-07-07 20:14 ` cvs-commit at gcc dot gnu.org 2021-07-07 20:30 ` msebor at gcc dot gnu.org 2021-07-09 17:38 ` msebor at gcc dot gnu.org 2021-07-09 17:54 ` msebor at gcc dot gnu.org 2021-07-13 19:27 ` msebor at gcc dot gnu.org 2021-07-13 19:27 ` msebor at gcc dot gnu.org 2021-07-15 9:22 ` clyon at gcc dot gnu.org 2021-07-15 19:16 ` cvs-commit at gcc dot gnu.org [this message] 2021-07-15 19:22 ` msebor 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-97027-4-zuM05vo4oU@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).