|Subject:||[Libunwind-devel] Problems with libunwind and shared library|
|Date:||Tue, 15 Jul 2014 13:53:28 +0200|
|User-agent:||Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0|
Hi,I'm trying to integrate libunwind into my code, but I'm running into a very weird issue with GCC.
My platform is GCC 4.8.2, Ubuntu 14.04, x86_64, using libunwind from the Ubuntu repositories (1.1-2.2ubuntu3.)
The setup I have is as follows: I have a shared library core.so, which is linking dynamically against libunwind.so. I have another executable test, which links against core.so. What happens now is that any exception thrown from core.so leads to a segfault in the test executable, with a callstack starting at __cxa_throw.
If I link libunwind.a statically into core.so, I get a similar error, but in this case I can see _Unwind_Resume from core.so (i.e. from the statically linked libunwind) on the callstack (and I get the complete callstack.) Notice that I don't actually use any of the libunwind functions, I merely link.
Interestingly, the exact same code works just fine when compiled using Clang. What's going on here? How can I resolve this issue?
|[Prev in Thread]||Current Thread||[Next in Thread]|