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/104103] [12 regression] many excess errors from g++.dg/asan/asan_test.C after r12-6606 Date: Wed, 19 Jan 2022 08:29:39 +0000 [thread overview] Message-ID: <bug-104103-4-Vj7C1Vop4d@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104103-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104103 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:53836c887a05db23ff3b9fc06f64e0ba78810ece commit r12-6727-g53836c887a05db23ff3b9fc06f64e0ba78810ece Author: Jakub Jelinek <jakub@redhat.com> Date: Wed Jan 19 09:28:25 2022 +0100 gimple-ssa-warn-access: Fix up asan_test.C -Wdangling-pointer regression [PR104103] As reported in the PR or as I've seen since the weekend, asan_test.C fails because of many warnings like: gcc/testsuite/g++.dg/asan/asan_test.cc:1157:10: error: using a dangling pointer to an unnamed temporary [-Werror=dangling-pointer=] gcc/testsuite/g++.dg/asan/asan_test.cc:1157:10: error: using a dangling pointer to an unnamed temporary [-Werror=dangling-pointer=] gcc/testsuite/g++.dg/asan/asan_test.cc:1162:27: error: using a dangling pointer to an unnamed temporary [-Werror=dangling-pointer=] ... (lots of them). There are no dangling pointers though, the warning pass sees: some_automatic_var ={v} {CLOBBER}; .ASAN_MARK (POISON, &some_automatic_var, 8); and warns on that (both on user vars and on e.g. TARGET_EXPR temporaries). There is nothing wrong on that, .ASAN_MARK is compiler instrumentation, which doesn't even touch the variable in any way nor make it escaped. What it instead does is change bytes in the shadow memory corresponding to the variable to reflect that the variable is out of scope and make sure that access to it would be diagnosed at runtime. So, for all purposes of the -Wdangling-pointer and -Wuse-after-free warnings, we should ignore this internal call. 2022-01-19 Jakub Jelinek <jakub@redhat.com> PR middle-end/104103 * gimple-ssa-warn-access.cc (pass_waccess::check_call): Don't check .ASAN_MARK calls.
next prev parent reply other threads:[~2022-01-19 8:29 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-18 19:47 [Bug testsuite/104103] New: " seurer at gcc dot gnu.org 2022-01-18 20:06 ` [Bug middle-end/104103] " jakub at gcc dot gnu.org 2022-01-18 22:50 ` seurer at gcc dot gnu.org 2022-01-19 0:45 ` msebor at gcc dot gnu.org 2022-01-19 1:04 ` cvs-commit at gcc dot gnu.org 2022-01-19 8:29 ` cvs-commit at gcc dot gnu.org [this message] 2022-01-19 8:31 ` jakub at gcc dot gnu.org 2022-01-19 18:57 ` pinskia 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-104103-4-Vj7C1Vop4d@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).