[cfe-dev] ARM Linux libc++ / libunwind — Exceptions not being caught

Andrew Brownsword via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 30 08:08:50 PDT 2018


No, I have rtti enabled.  I am continuing to try and build a version of the toolchain that works, but many combinations simply don’t build and I have yet to hit upon one that catches exceptions properly.

> On Aug 30, 2018, at 7:04 AM, Louis Dionne <ldionne at apple.com> wrote:
> 
> Are you building your test program with -fno-rtti? I’ve seen a problem where if libc++ is built with RTTI and exceptions enabled, and a program is built with exceptions enabled BUT -fno-rtti, exceptions thrown from the program will not be caught.
> 
> Louis
> 
>> On Aug 25, 2018, at 15:20, Andrew Brownsword via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>> 
>> I have built the llvm/clang 7.0.0 rc2, including libc++/libc++abi/libunwind for my Ubuntu 16.04 Linux 32-bit ARM7 hf target.  A trivial c++17 test program with just this try/catch block:
>> 
>> try { auto result = stoul(“foo”); } catch (...) { std::cerr << “caught!” << std::endl; }
>> 
>> fails to print “caught!”  Instead it just aborts.  If no exceptions are thrown,  programs built with this toolchain behave as expected.
>> 
>> I have tried numerous variations of the toolchain, compile and link steps (including alternatives to the cxxabi), however they all run into various errors or ultimately give the same runtime abort.
>> 
>> Any suggestions for how to get a functioning Linux armhf clang/libc++ 7.0.0 toolchain?
>> 
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 



More information about the cfe-dev mailing list