public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub 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: Tue, 18 Jan 2022 20:06:34 +0000	[thread overview]
Message-ID: <bug-104103-4-x5o8SDQ116@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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
          Component|testsuite                   |middle-end
     Ever confirmed|0                           |1
                 CC|                            |jakub at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2022-01-18

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've just debugged this, the following patch fixes that.
.ASAN_MARK, while it takes address of variables, often after they go out of
scope, doesn't access those variables in any way, it poisons or unpoisons the
corresponding shadow memory.

--- gcc/gimple-ssa-warn-access.cc.jj    2022-01-16 20:55:46.783932110 +0100
+++ gcc/gimple-ssa-warn-access.cc       2022-01-18 20:56:13.697780325 +0100
@@ -4232,6 +4232,11 @@ pass_waccess::check_call (gcall *stmt)
   if (gimple_call_builtin_p (stmt, BUILT_IN_NORMAL))
     check_builtin (stmt);

+  /* .ASAN_MARK doesn't access any vars, only modifies shadow memory.  */
+  if (gimple_call_internal_p (stmt)
+      && gimple_call_internal_fn (stmt) == IFN_ASAN_MARK)
+    return;
+
   if (!m_early_checks_p)
     if (tree callee = gimple_call_fndecl (stmt))
       {

  reply	other threads:[~2022-01-18 20:06 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 ` jakub at gcc dot gnu.org [this message]
2022-01-18 22:50 ` [Bug middle-end/104103] " 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
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-x5o8SDQ116@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).