[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: |
Sat, 18 Nov 2017 10:24:24 +0000 |
On 17 Nov 2017, at 18:31, Lobron, David <dlobron@akamai.com> wrote:
>
>
>> You’ll need to also link with libstdc++. Using g++ or clang++ instead of
>> gcc / clang will do the right thing.
>
> Thank you! I added -lobjcxx -lstdc++ and -L.. to the link command. That
> fixed the build issues, and I was able to run the tests. All of the tests
> pass now, including the exception tests:
>
> 44/46 Test #44: MethodArguments_optimised .............. Passed 0.00 sec
> Start 45: CXXExceptions
> 45/46 Test #45: CXXExceptions .......................... Passed 0.00 sec
> Start 46: CXXExceptions_optimised
> 46/46 Test #46: CXXExceptions_optimised ................ Passed 0.00 sec
>
> 100% tests passed, 0 tests failed out of 46
>
> Could you suggest the best way to apply this fix to the libobjc2 library as a
> whole? I can use patch or the like to update makefiles or cmake lists as
> needed. Once that is done, I will try a rebuild of my original program, and
> see if this fixes the exception crashes.
>
> Thank you again!
I think the best option is probably to give up trying to avoid the libstdc++
dependency and just build a single libobjc.so that links against libstdc++.so
if lib{supc++,cxxrt,c++abi}.so is not available.
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, Lobron, David, 2017/11/01
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/16
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, David Chisnall, 2017/11/16
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/16
- Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2, Lobron, David, 2017/11/16
- 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/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 <=
- 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, 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, Wolfgang Lux, 2017/11/22