gcc 4.3.2 libgcc_s.so exception handling broken?

Nate Eldredge neldredge at math.ucsd.edu
Sat Jan 17 23:07:30 PST 2009


On Sat, 17 Jan 2009, xorquewasp at 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 at math.ucsd.edu


More information about the freebsd-hackers mailing list