From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mxd1.seznam.cz (mxd1.seznam.cz [IPv6:2a02:598:a::78:210]) by sourceware.org (Postfix) with ESMTPS id 9EC7E3858C27 for ; Wed, 24 Nov 2021 19:41:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9EC7E3858C27 Received: from email.seznam.cz by email-smtpc15b.ko.seznam.cz (email-smtpc15b.ko.seznam.cz [10.53.14.195]) id 2a9ffbd53a1741e92a95d694; Wed, 24 Nov 2021 20:41:14 +0100 (CET) Received: from unknown ([::ffff:109.183.32.44]) by email.seznam.cz (szn-ebox-5.0.84) with HTTP; Wed, 24 Nov 2021 20:41:08 +0100 (CET) From: "Zdenek Sojka" To: "Jeff Law" Cc: "Paul Floyd" , Subject: Re: distinguishing gcc compilation valgrind false positives Date: Wed, 24 Nov 2021 20:41:08 +0100 (CET) Message-Id: References: <17f4511e-b440-d898-3a95-5f5513d13ff6@gmail.com> Mime-Version: 1.0 (szn-mime-2.1.16) X-Mailer: szn-ebox-5.0.84 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 19:41:24 -0000 Hello Jeff, ---------- P=C5=AFvodn=C3=AD e-mail ---------- Od: Jeff Law via Gcc Komu: Paul Floyd , gcc@gcc.gnu.org Datum: 24. 11. 2021 20:33:02 P=C5=99edm=C4=9Bt: Re: distinguishing gcc compilation valgrind false posit= ives " On 11/24/2021 12:15 PM, Paul Floyd via Gcc wrote: > > On 24/11/2021 20:05, Zdenek Sojka via Gcc wrote: >> Hello, >> >> from time to time, I come upon a testcase that failed during the >> automated >> runs, but passes during reduction; there are valgrind warnings present,= >> however. How do I distinguish what warnings are valid and which are >> false >> positives? Is there any way gcc could prevent generating the false >> positives? > > > What makes you think that any are false positives? > > Memcheck generally has a low false positive rate (though I am little > biased). > > You need to read the source and decide based on that. Agreed.=C2=A0 Work from the assumption it's a real GCC issue until proven = otherwise. I believe GCC has annotations to help valgrind that are turned on by a magic configuration option as well. " I have gcc configured with --enable-valgrind-annotations , if that is the = one you are talking about? =C2=A0 " Finally, there is an issue with sparsesets that will trigger a warning from valgrind.=C2=A0 Those are the only ones I would consistently ignore f= rom GCC. Jeff " Yes I remember those - but it would be nice to get rid of them anyway, at = least to simplify testcase reduction by having no valgrind warning on a = clean build. I could also use a valgrind suppression file; this is also part of my question, if there is one readily available Thanks, Zdenek =C2=A0 " "