[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux
From: |
David Chisnall |
Subject: |
Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux |
Date: |
Mon, 11 Dec 2017 17:01:38 +0000 |
On 11 Dec 2017, at 16:57, Lobron, David <dlobron@akamai.com> wrote:
>
>>> Thanks, David! I will try to make a reduced test case, based on this.
>>> I'll start with a simple program that throws an ObjC exception in an
>>> NS_HANDLER, where the whole thing resides in a .mm file. BTW, I've enabled
>>> native exceptions here. I will let you guys know when I've got something.
>>
>> Just use @try and @catch. If you can find a smallish test case, please file
>> a bug on GitHub and I’ll take a look. Ideally, a test case shouldn’t depend
>> on anything other than libobjc2 - take a look at the existing EH tests and
>> see if you can make a similar one that shows the issue.
>
> I've been trying combinations of C++ and ObjC exceptions in a .mm file, and
> so far I haven't been able to reproduce the abort behavior. I've attached my
> latest code, which throws ObjC and C++ exceptions from C++ and ObjC classes,
> and catches them. Please let me know if you can think of any variations I
> haven't tried here.
>
If the failure is what I suspect that it is, then it’s a problem caused by
mixing C++ and Objective-C exception unwinding, so it won’t be possible to
reproduce in a single file. You will need to throw an exception from
Objective-C++ and have it pass through stack frames from an Objective-C
compilation unit that includes an @finally block that runs some code, and then
be caught in an Objective-C++ compilation unit.
David
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, (continued)
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/06
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/06
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/06
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/06
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/07
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/07
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/07
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/07
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/07
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/11
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux,
David Chisnall <=
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/11
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/11
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/11
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/12
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/12
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/12
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/18
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/18
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, Lobron, David, 2017/12/18
- Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux, David Chisnall, 2017/12/18