[cfe-dev] A problem from XCode 4 - help sought tracking it down

Douglas Gregor dgregor at apple.com
Fri Apr 22 16:58:04 PDT 2011


On Apr 21, 2011, at 7:33 AM, Matt Lamari wrote:

> Sorry if this isn't the right place; but I'm facing an XCode 4 (LLVM 2.0
> to Apple, I heard it's LLVM 2.9 under the hood) issue that may involve
> LLVM/Clang, and maybe some people on this list could help me short-circuit the
> source.
> 
> I have a code pattern that, when used in XCode 4 in Objective C++ files,
> causes the whole IDE to go crash.  It is a stripped sample to highlight
> the issue.

Sorry about that, and thanks for the great test case.

> In the call stack, I see libclang.dylib, calling through
> clang_visitChildren, up through various CursorVisitor::Visit... and
> CursorVisitor::VisitChildren... calls.  I have LLVM compiling, and
> imagine I could replace XCode's libclang.dylib in order to add debugging
> aids/logging.
> 
> Am I on the right track?  Should I look near the point of failure, or
> should I inspect the integrity of the data sent to clang_visitChildren
> first?
> 
> If I'm not on the right track, I appreciate any help in getting me moving.


You're on the right track; it turns out it was a NULL pointer dereference, which I (just) fixed here:

	http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20110418/041166.html

	- Doug



More information about the cfe-dev mailing list