[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: |
David Chisnall |
Subject: |
Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2 |
Date: |
Wed, 22 Nov 2017 09:57:38 +0000 |
On 21 Nov 2017, at 20:48, Lobron, David <dlobron@akamai.com> wrote:
>
>>
>> You will need to make sure that every stack frame that may have C++
>> exceptions thrown through it is compiled with -fobjc-runtime=gnustep-1.8 (or
>> 1.7, I forget exactly when I fixed this). The old GCC ABI corrupts foreign
>> exceptions when they are thrown through Objective-C frames.
>
> OK- I made sure that -fobjc-runtime=gnustep-1.8 appears in my OBJCXX flags,
> and I'm trying a complete rebuild. I'm now getting a compilation error when
> building a .mm file:
>
> #error "gnustep-base is configured to use 'traditional' exceptions, but you
> are building for 'native' exceptions."
>
> The configure script for gnustep-base finds the GNU runtime:
>
> checking the Objective-C runtime... GNU
>
> but it's not able to link the uncaught exception handler, so it turns off
> native exceptions:
>
> checking for objc_setUncaughtExceptionHandler() in runtime... no
>
> Does this mean that libobjc2 does not support the uncaught exception handler
> code? I'm wondering if this is a clue as to why my code crashes, whereas the
> libobjc2 tests are OK.
Okay, that probably accounts for the issues that you’re seeing. I don’t really
understand the GNUstep-base build system, but it looks as if it’s picking up
the gcc runtime (do you have that installed somehow? If so, please delete it!)
and falling back to using setjmp/longjmp exceptions.
David
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, (continued)
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, David Chisnall, 2017/11/17
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/17
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, David Chisnall, 2017/11/18
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/20
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/20
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, David Chisnall, 2017/11/20
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/21
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/21
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, David Chisnall, 2017/11/21
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/21
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2,
David Chisnall <=
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/22
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Wolfgang Lux, 2017/11/22
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/22
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/28
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, David Chisnall, 2017/11/29
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Richard Frith-Macdonald, 2017/11/29
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, David Chisnall, 2017/11/29
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Richard Frith-Macdonald, 2017/11/29