discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Crash occurs when catching std::exception in Objective-C++ code comp


From: Lobron, David
Subject: Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2
Date: Tue, 21 Nov 2017 16:28:44 +0000

> $ nm -C CXXException_mm|grep -i except
>                 U __cxa_allocate_exception@@CXXABI_1.3
> 0000000000400ea4 r GCC_except_table0
>                 U std::exception::~exception()@@GLIBCXX_3.4
> 00000000006020d0 V typeinfo for std::exception@@GLIBCXX_3.4
> 00000000006020a0 V vtable for std::exception@@GLIBCXX_3.4
> 
> I checked for those strings in my main program, and the result was similar, 
> although not identical:
> 
> $ nm -C obj/mapmaker|grep __cxa_allocate_exception
>                 U __cxa_allocate_exception@@CXXABI_1.3
> (ALSI8)dlobron@bos-lps80:~/build/clangport/akamai/mapmaker$ nm -C 
> obj/mapmaker|grep std::exception   
>                 U std::exception::~exception()@@GLIBCXX_3.4
>                 U typeinfo for std::exception@@GLIBCXX_3.4
> 
> The only difference here is that the non-working main program doesn't have 
> "vtable for std::exception".  Could that be the source of the problem?  Or 
> could this be a runtime or compile-time difference in my code?

Oops, another difference is that the working program has a defined address for 
the typoinfo, whereas in the non-working one, the typeinfo is undefined.  I'm 
still not sure whether this is the cause of the crash, though.

--David


reply via email to

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