From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6739 invoked by alias); 25 Feb 2013 14:19:31 -0000 Received: (qmail 6716 invoked by uid 22791); 25 Feb 2013 14:19:28 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Feb 2013 14:19:17 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1PEJAiN007910 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Feb 2013 09:19:10 -0500 Received: from host2.jankratochvil.net (ovpn-116-19.ams2.redhat.com [10.36.116.19]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1PEJ3AU019654 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 25 Feb 2013 09:19:08 -0500 Date: Mon, 25 Feb 2013 14:19:00 -0000 From: Jan Kratochvil To: Andreas Schwab Cc: Pedro Alves , Philippe Waroquiers , gdb-patches@sourceware.org Subject: Re: [patch+NEWS] Avoid false valgrind warnings on linux_ptrace_test_ret_to_nx Message-ID: <20130225141902.GA25286@host2.jankratochvil.net> References: <20130220140520.GA10822@host2.jankratochvil.net> <5124E66D.3060606@redhat.com> <20130220152331.GA16617@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00626.txt.bz2 On Wed, 20 Feb 2013 21:15:07 +0100, Andreas Schwab wrote: > Jan Kratochvil writes: > > > + /* Below we'll mmap a non-executable page, which under Valgrind > > + results in annoying warnings such as > > + "Bad permissions for mapped region at address 0xfoobar". > > + Just skip the whole test if running under Valgrind. */ > > +#ifdef HAVE_RUNNING_ON_VALGRIND > > + if (RUNNING_ON_VALGRIND) > > + return; > > +#endif > > Wouldn't it be enough for gdb to ship with an appropriate suppression > file? Besides some inconveniences of using suppression files primarily there would still remain the false warning printed by GDB itself: warning: linux_ptrace_test_ret_to_nx: PC 0x3806e309 is neither near return address 0x4032000 nor is the return instruction 0x602e33! Jan