tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] crash when function that is called from tcc compiled


From: Stephan Beal
Subject: Re: [Tinycc-devel] crash when function that is called from tcc compiled dynamic library, throws exception
Date: Tue, 15 Sep 2015 11:38:45 +0200

On Tue, Sep 15, 2015 at 11:25 AM, Tigran Grigoryan <address@hidden> wrote:
When linux shared object (compiled with tcc) calls some c++ function, that throws exception, application crashes.
Seems that std::terminate is called from __cxa_throw ().

Is this something expected? (if  "so" is compiled with llvm or gcc C compiler it works ok)

Behaviour of a C app which allows a C++ exception to propagate through it is UNDEFINED. So, yes, what you're seeing is, in a sense, expected.

C code has no way of handling an exception, and a C++ app which does not catch an exception crashes.


--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

reply via email to

[Prev in Thread] Current Thread [Next in Thread]