From owner-freebsd-current@FreeBSD.ORG Sun Aug 5 16:23:52 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE09816A469 for ; Sun, 5 Aug 2007 16:23:52 +0000 (UTC) (envelope-from simias.n@gmail.com) Received: from simias.hd.free.fr (vit94-5-82-243-51-8.fbx.proxad.net [82.243.51.8]) by mx1.freebsd.org (Postfix) with ESMTP id 02AC013C428 for ; Sun, 5 Aug 2007 16:23:51 +0000 (UTC) (envelope-from simias.n@gmail.com) Received: from simias.hd.free.fr (localhost [127.0.0.1]) by simias.hd.free.fr (8.14.1/8.14.1) with ESMTP id l75GDFJN027391; Sun, 5 Aug 2007 18:13:15 +0200 (CEST) (envelope-from simias.n@gmail.com) Received: (from simias@localhost) by simias.hd.free.fr (8.14.1/8.14.1/Submit) id l75GD04m027390; Sun, 5 Aug 2007 18:13:00 +0200 (CEST) (envelope-from simias.n@gmail.com) X-Authentication-Warning: simias.hd.free.fr: simias set sender to simias.n@gmail.com using -f From: Simias To: freebsd-current@freebsd.org References: <46B4BC80.1080902@cs.chalmers.se> Date: Sun, 05 Aug 2007 18:12:45 +0200 In-Reply-To: <46B4BC80.1080902@cs.chalmers.se> (Niklas Sorensson's message of "Sat\, 04 Aug 2007 19\:50\:56 +0200") Message-ID: <86lkcqj6yq.fsf@simias.hd.free.fr> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Sun, 05 Aug 2007 17:26:48 +0000 Cc: Niklas Sorensson Subject: Re: gcc 4.2 profiling breaks argv X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2007 16:23:53 -0000 Niklas Sorensson writes: > Hi, > > following up on the thread started by Nick Frampton yesterday: > > I can repeat the problem, although it looks slightly > different. Instead of crashing when argv is accessed, both argc and > argv are zero. This behavior is triggered by both gcc 4.2.0 and 4.2.1: > [...] I have an other problem with gprof on CURRENT, this time with c++: === $ cat test.cc #include using namespace std; int main() { try { throw 1; } catch (int) { cout << "in catch" << endl; } cout << "after catch" << endl; } $ c++ test.cc && ./a.out in catch after catch $ c++ -pg test.cc && ./a.out Abort trap (core dumped) $ === I tried with different programs and it seems that it aborts on any throw'd exception. If nothing is thrown however, the profiling seems to work as expected. $ uname -a FreeBSD simias.hd.free.fr 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Jul 10 15:39:06 CEST 2007 root@simias.hd.free.fr:/usr/obj/usr/src/sys/SIMKERNEL i386 $ c++ -v Using built-in specs. Target: i386-undermydesk-freebsd Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 4.2.0 20070514 [FreeBSD] -- Simias