[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux

From: Lobron, David
Subject: Re: Mysterious crash in NSRunLoop, using libobjc2 on Linux
Date: Mon, 11 Dec 2017 20:10:07 +0000

Hey David-

>>> 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.  

I created three files: a .mm file that contains main(), a .mm that throws an 
ObjC exception, and a .m that passes the ObjC exception through from a @finally 
block back to the .mm file that contains main.  I think I'm getting closer, 
because my debug output now has several "Fight!" clauses (see below) but all 
the personality classes are of type GNUCOBJC.  I haven't been able to coax it 
to emit GNUCC++.

I've attached the three files, which I compile into separate .o files and then 
link (compile/link command is also attached).

Do you have any other ideas for how I can get an exception of "Class: GNUCC++" 
to appear, instead of just GNUCOBJC?

Thank you,


Attachment: compile.sh
Description: compile.sh

Attachment: ExceptionPersonality.mm
Description: ExceptionPersonality.mm

Attachment: RunTest.mm
Description: RunTest.mm

Attachment: TestExceptionPersonality.m
Description: TestExceptionPersonality.m

Attachment: ATT00001.txt
Description: ATT00001.txt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]