From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9224 invoked by alias); 8 Sep 2011 19:13:17 -0000 Received: (qmail 9214 invoked by uid 22791); 8 Sep 2011 19:13:16 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,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; Thu, 08 Sep 2011 19:12:51 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p88JClIJ005147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Sep 2011 15:12:47 -0400 Received: from host1.jankratochvil.net (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p88JCjL4005815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Sep 2011 15:12:47 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p88JCit4003414; Thu, 8 Sep 2011 21:12:44 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p88JChHm003410; Thu, 8 Sep 2011 21:12:43 +0200 Date: Thu, 08 Sep 2011 19:54:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: Running testsuite with /proc/sys/kernel/core_uses_pid set, avoiding leaving core dump files behind Message-ID: <20110908191242.GA32216@host1.jankratochvil.net> References: <201109071718.38581.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201109071718.38581.pedro@codesourcery.com> 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: 2011-09/txt/msg00150.txt.bz2 On Wed, 07 Sep 2011 18:18:38 +0200, Pedro Alves wrote: > I now only end up with a single unexpected core dump after a > testrun, generated by the typeddwarf binary of typeddwarf.exp > (a SIGSEGV). I'm not sure what's going on here. Looking at > the .c file, there doesn't seem to be anything that should crash. It is linked from .exp with -nostdlib, therefore there is no _exit syscall but ret, jumping into a garbage. > What I find strange is that the typeddwarf-amd64.S > file claims to be generated by > > "gcc -S -g -O2 typeddwarf.c -o typeddwarf-amd64.S" > > but typeddwarf-amd64.S doesn't contain a main label, it > has a _start label instead, so it looks like it got hand > massaged a bit. I agree. > Indeed, if I compile typeddwarf.c > directly, I get a binary that does not crash. As you did not use -nostdlib: if { [prepare_for_testing "${test}.exp" "${test}" ${sfile} {nodebug additional_flags=-nostdlib}] } { The reason for -nostdlib is: Re: Regression: Re: RFC: implement typed DWARF stack http://sourceware.org/ml/gdb-patches/2011-05/msg00325.html to be able to run it with -m32 even on system without 32-bit devel libraries installed. Still I do not get any core file from this testcase, either with linux-nat or with gdbserver, in both cases the program gets properly killed before it crashes. Thanks, Jan