W dniu 15.09.2015 o 11:38, Stephan Beal pisze:
> On Tue, Sep 15, 2015 at 11:25 AM, Tigran Grigoryan <
> [email protected]> 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.

A crash isn't good behavior anyway. There's the risk that it's a memory
error leading to a security vulnerability - and compiling source code
can be a real attack vector.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to