public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized
       [not found] <bug-93100-4@http.gcc.gnu.org/bugzilla/>
@ 2021-04-16 22:31 ` msebor at gcc dot gnu.org
  2021-04-16 22:32 ` msebor at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-16 22:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93100

Martin Sebor <msebor at gcc dot gnu.org> 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 gnu.org

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Reconfirming with GCC 11.  The reason for the false negative is that
instrumentation functions injected by the sanitizers look to the warning like
they might initialize the variables.  That's simply because the warning hasn'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;

  <bb 2> :
  # .MEM_4 = VDEF <.MEM_3(D)>
  .ASAN_MARK (UNPOISON, &a, 8);   <<< assumed to write to a
  # VUSE <.MEM_4>
  _1 = a.i;                       <<< missing warning
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # .MEM_5 = VDEF <.MEM_4>
  b = a;

  <bb 4> :
  # .MEM_2 = PHI <.MEM_4(2), .MEM_5(3)>
  # .MEM_6 = VDEF <.MEM_2>
  .ASAN_MARK (POISON, &a, 8);
  # VUSE <.MEM_6>
  return;

}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98508
[Bug 98508] Sanitizer disable -Wall and -Wextra

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized
       [not found] <bug-93100-4@http.gcc.gnu.org/bugzilla/>
  2021-04-16 22:31 ` [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized msebor at gcc dot gnu.org
@ 2021-04-16 22:32 ` msebor at gcc dot gnu.org
  2021-04-16 22:32 ` msebor at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-16 22:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93100

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |awdawdawdawq123123 at gmx dot de

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 98508 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized
       [not found] <bug-93100-4@http.gcc.gnu.org/bugzilla/>
  2021-04-16 22:31 ` [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized msebor at gcc dot gnu.org
  2021-04-16 22:32 ` msebor at gcc dot gnu.org
@ 2021-04-16 22:32 ` msebor at gcc dot gnu.org
  2021-05-11 19:51 ` msebor at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-16 22:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93100
Bug 93100 depends on bug 98508, which changed state.

Bug 98508 Summary: Sanitizer disable -Wall and -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98508

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized
       [not found] <bug-93100-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-04-16 22:32 ` msebor at gcc dot gnu.org
@ 2021-05-11 19:51 ` msebor at gcc dot gnu.org
  2021-05-13 22:07 ` cvs-commit at gcc dot gnu.org
  2021-05-13 22:40 ` msebor at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-05-11 19:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93100

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
      Known to fail|11.0                        |11.1.0, 12.0
           Keywords|                            |patch

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570117.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized
       [not found] <bug-93100-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-05-11 19:51 ` msebor at gcc dot gnu.org
@ 2021-05-13 22:07 ` cvs-commit at gcc dot gnu.org
  2021-05-13 22:40 ` msebor at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-13 22:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93100

--- Comment #5 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:2efe245bb88bf4574e322ef7e6d2df83d9e13237

commit r12-783-g2efe245bb88bf4574e322ef7e6d2df83d9e13237
Author: Martin Sebor <msebor@redhat.com>
Date:   Thu May 13 16:05:50 2021 -0600

    Avoid -Wuninitialized false negatives with sanitization and VLAs.

    Resolves:
    PR tree-optimization/93100 - gcc -fsanitize=address inhibits
-Wuninitialized
    PR middle-end/98583 - missing -Wuninitialized reading from a second VLA in
its own block

    gcc/ChangeLog:

            PR tree-optimization/93100
            PR middle-end/98583
            * tree-ssa-uninit.c (check_defs): Exclude intrinsic functions that
            don't modify referenced objects.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/93100
            PR middle-end/98583
            * g++.dg/warn/uninit-pr93100.C: New test.
            * gcc.dg/uninit-pr93100.c: New test.
            * gcc.dg/uninit-pr98583.c: New test.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized
       [not found] <bug-93100-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-05-13 22:07 ` cvs-commit at gcc dot gnu.org
@ 2021-05-13 22:40 ` msebor at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-05-13 22:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93100

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed in GCC 12.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-13 22:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93100-4@http.gcc.gnu.org/bugzilla/>
2021-04-16 22:31 ` [Bug middle-end/93100] gcc -fsanitize=address inhibits -Wuninitialized msebor at gcc dot gnu.org
2021-04-16 22:32 ` msebor at gcc dot gnu.org
2021-04-16 22:32 ` msebor at gcc dot gnu.org
2021-05-11 19:51 ` msebor at gcc dot gnu.org
2021-05-13 22:07 ` cvs-commit at gcc dot gnu.org
2021-05-13 22:40 ` msebor at gcc dot gnu.org

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).