From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 18 07:07:30 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57161106564A for ; Sun, 18 Jan 2009 07:07:30 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 3A04F8FC16 for ; Sun, 18 Jan 2009 07:07:30 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n0I77Uo29347; Sat, 17 Jan 2009 23:07:30 -0800 (PST) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n0I77Ts25673; Sat, 17 Jan 2009 23:07:29 -0800 (PST) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Sat, 17 Jan 2009 23:07:29 -0800 (PST) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: xorquewasp@googlemail.com In-Reply-To: <20090117231404.GB77134@logik.internal.network> Message-ID: References: <20090117231404.GB77134@logik.internal.network> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: gcc 4.3.2 libgcc_s.so exception handling broken? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 07:07:30 -0000 On Sat, 17 Jan 2009, xorquewasp@googlemail.com wrote: > Hello. > > I have some C code that's compiled with -fexceptions using > the lang/gnat-gcc43 port. I'm on 6.4-RELEASE-p2. > > A function c_function in the C code takes a callback as an argument. > > I'm passing this function the address of a function ext_function defined > in another language (Ada, to be precise, but it seems to happen > with C++ too). The main body of my program is written in this language > so C is effectively the "foreign" code (whatever). > > If ext_function raises an exception, the exception is NOT propagated > through the C code, the process simply exits. I tried a simple example of this in C++ and it works as expected. (I am on 7.0-RELEASE/amd64.) So it isn't completely busted, at least. Can you post an example that exhibits the problem? Ideally, something complete that can be compiled and is as simple as possible. If you can do it with C++ rather than Ada it might be easier, so people don't have to install the Ada compiler. Also please mention the commands you use to compile, and what they output when you compile using -v, and what architecture you are on. -- Nate Eldredge neldredge@math.ucsd.edu