From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71702 invoked by alias); 8 Aug 2015 13:16:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 71639 invoked by uid 48); 8 Aug 2015 13:16:07 -0000 From: "jg at jguk dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/16351] NULL dereference warnings Date: Sat, 08 Aug 2015 13:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.0.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jg at jguk dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: law at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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-SW-Source: 2015-08/txt/msg00550.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D16351 --- Comment #40 from Jon Grant --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #35) > which means that there is a path through which a null pointer could be > potentially dereferenced. However, this actually cannot happen because > linemap_add will not return NULL in this case. >=20 > I fear this case might be quite common and lead to many false positives t= hat > are then quite hard to understand due to the poor location info in the > middle-end. I am sure this is very common.. we use static analysis, and there will be m= any potentially dereferences.. the thing is, the implementation of linemap_add = may be changed.. so those calling linemap_add should always check result is non-NULL before using right? (then the calling code can handle gracefully) >>From gcc-bugs-return-494409-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Aug 08 13:58:49 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 126055 invoked by alias); 8 Aug 2015 13:58:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 126024 invoked by uid 48); 8 Aug 2015 13:58:45 -0000 From: "dilyan.palauzov at aegee dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/67156] New: config/bootstrap-debug.mk: STAGE2_CFLAGS += -gtoggle Date: Sat, 08 Aug 2015 13:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dilyan.palauzov at aegee dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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-08/txt/msg00551.txt.bz2 Content-length: 1254 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67156 Bug ID: 67156 Summary: config/bootstrap-debug.mk: STAGE2_CFLAGS += -gtoggle Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: dilyan.palauzov at aegee dot org Target Milestone: --- config/bootstrap-debug.mk contains: STAGE2_CFLAGS += -gtoggle and in turn stage2 is compiled with -gtoggle, while stage3 is compile without -gtoggle. This can be seen by comparing stage{2,3}-gcc/Makefile . After finishing stage3, the build process compares the binaries from stage2 and stage3, which differ, because they were compiled with/out -gtoggle. Removing -gtoggle from config/bootstrap-debug.mk:STAGE2_CFLAGS enables to finish the compilation without errors (during the final comparison) I compile gcc with /git/gcc/configure --enable-host-shared --enable-threads=posix --with-arch=haswell --enable-__cxa_atexit --enable-languages=c,c++,lto,jit --enable-targets=all --enable-nls --with-linker-hash-style=gnu --with-system-zlib --disable-multilib and the gcc-git repository is at the newest state.