public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/64717] New: -fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
@ 2015-01-21 17:06 burnus at gcc dot gnu.org
  2015-01-29 17:33 ` [Bug sanitizer/64717] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-01-21 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64717
           Summary: -fsanitize=vptr leads to warning: ‘<anonymous>’ may be
                    used uninitialized in this function
                    [-Wmaybe-uninitialized]
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org

Created attachment 34522
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34522&action=edit
Testcase (test.ii), compile with: -Wmaybe-uninitialized -fsanitize=vptr

Using -fsanitize=vptr on a mid-size C++ code leads to a few hundreds of the
following warnings:

warning: ‘<anonymous>’ may be used uninitialized in this function
[-Wmaybe-uninitialized]


The test case shows with
  g++ -S -Wmaybe-uninitialized -fsanitize=vptr test.ii
also that message.
>From gcc-bugs-return-474242-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 21 17:21:41 2015
Return-Path: <gcc-bugs-return-474242-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24613 invoked by alias); 21 Jan 2015 17:21:40 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 24362 invoked by uid 48); 21 Jan 2015 17:21:34 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/64710] [5 Regression] lto1: internal compiler error: Segmentation fault
Date: Wed, 21 Jan 2015 17:21:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: priority
Message-ID: <bug-64710-4-MGqWzJBkEQ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64710-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64710-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg02236.txt.bz2
Content-length: 291

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd710

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug sanitizer/64717] -fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  2015-01-21 17:06 [Bug sanitizer/64717] New: -fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized] burnus at gcc dot gnu.org
@ 2015-01-29 17:33 ` jakub at gcc dot gnu.org
  2015-01-29 21:04 ` jakub at gcc dot gnu.org
  2015-01-30 20:30 ` gerrit.los at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-29 17:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-01-29
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34619
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34619&action=edit
gcc5-pr64717.patch

Untested fix.  The SAVE_EXPR in there was needed in earlier versions of =vptr
support, where it emitted the __ubsan_* calls early, but right now it is used
just once, and the SAVE_EXPR causes problems when the same dtor call is used
shared in multiple locations (finally and cleanup).  There is still a possible
SAVE_EXPR if the address of the object has side-effects, but I hope dtors are
never called that way if they'd could appear in cleanups.


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

* [Bug sanitizer/64717] -fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  2015-01-21 17:06 [Bug sanitizer/64717] New: -fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized] burnus at gcc dot gnu.org
  2015-01-29 17:33 ` [Bug sanitizer/64717] " jakub at gcc dot gnu.org
@ 2015-01-29 21:04 ` jakub at gcc dot gnu.org
  2015-01-30 20:30 ` gerrit.los at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-29 21:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

* [Bug sanitizer/64717] -fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  2015-01-21 17:06 [Bug sanitizer/64717] New: -fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized] burnus at gcc dot gnu.org
  2015-01-29 17:33 ` [Bug sanitizer/64717] " jakub at gcc dot gnu.org
  2015-01-29 21:04 ` jakub at gcc dot gnu.org
@ 2015-01-30 20:30 ` gerrit.los at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: gerrit.los at gmail dot com @ 2015-01-30 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Gert-jan Los <gerrit.los at gmail dot com> ---
I want to confirm that all false warnings in my code are fixed by your patch.

Thanks.


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

end of thread, other threads:[~2015-01-30 20:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 17:06 [Bug sanitizer/64717] New: -fsanitize=vptr leads to warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized] burnus at gcc dot gnu.org
2015-01-29 17:33 ` [Bug sanitizer/64717] " jakub at gcc dot gnu.org
2015-01-29 21:04 ` jakub at gcc dot gnu.org
2015-01-30 20:30 ` gerrit.los at gmail dot com

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