From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD6873844062; Fri, 16 Apr 2021 22:31:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD6873844062 From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized Date: Fri, 16 Apr 2021 22:31:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 9.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: msebor at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_fail cc component cf_reconfirmed_on bug_status dependson assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2021 22:31:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93100 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |10.2.1, 11.0, 9.3.0 CC| |msebor at gcc dot gnu.org Component|sanitizer |middle-end Last reconfirmed|2020-01-09 00:00:00 |2021-4-16 Status|NEW |ASSIGNED Depends on| |98508 Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot g= nu.org --- Comment #2 from Martin Sebor --- Reconfirming with GCC 11. The reason for the false negative is that instrumentation functions injected by the sanitizers look to the warning li= ke they might initialize the variables. That's simply because the warning has= n't been taught they're special and don't write to the variables. The patch in pr98508 comment 5 enables the warning. Let me submit it for GCC 12. void f () { struct A b; struct A a; int _1; : # .MEM_4 =3D VDEF <.MEM_3(D)> .ASAN_MARK (UNPOISON, &a, 8); <<< assumed to write to a # VUSE <.MEM_4> _1 =3D a.i; <<< missing warning if (_1 !=3D 0) goto ; [INV] else goto ; [INV] : # .MEM_5 =3D VDEF <.MEM_4> b =3D a; : # .MEM_2 =3D PHI <.MEM_4(2), .MEM_5(3)> # .MEM_6 =3D VDEF <.MEM_2> .ASAN_MARK (POISON, &a, 8); # VUSE <.MEM_6> return; } Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98508 [Bug 98508] Sanitizer disable -Wall and -Wextra=