$ uname -v Darwin Kernel Version 11.1.0: Tue Jul 26 16:07:11 PDT 2011; root:xnu-1699.22.81~1/RELEASE_X86_64 $ clang --version clang version 3.0 (trunk 139990) Target: x86_64-apple-darwin11.1.0 Thread model: posix $ clang -c browser_webview_mac-rPF6f7.mii -arch i386 Assertion failed: (CurOffs <= CurLayObj->first), function getObjCEncodingForStructureImpl, file /Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm/tools/clang/lib/AST/ASTContext.cpp, line 4627. 0 clang 0x00000001013643f2 _ZL15PrintStackTracePv + 34 1 clang 0x00000001013649d9 _ZL13SignalHandleri + 713 2 libsystem_c.dylib 0x00007fff89c24cfa _sigtramp + 26 3 libsystem_c.dylib 0x00007fff89bed00e szone_malloc_should_clear + 1115 4 clang 0x000000010001c2b6 abort + 22 5 clang 0x000000010001c308 __assert_rtn + 56 6 clang 0x00000001007d2374 clang::ASTContext::getObjCEncodingForStructureImpl(clang::RecordDecl*, std::string&, clang::FieldDecl const*, bool) const + 2690 7 clang 0x00000001007d0fba clang::ASTContext::getObjCEncodingForTypeImpl(clang::QualType, std::string&, bool, bool, clang::FieldDecl const*, bool, bool, bool) const + 2526 8 clang 0x00000001007d1648 clang::ASTContext::getObjCEncodingForTypeImpl(clang::QualType, std::string&, bool, bool, clang::FieldDecl const*, bool, bool, bool) const + 4204 9 clang 0x00000001007d2ca7 clang::ASTContext::getObjCEncodingForMethodDecl(clang::ObjCMethodDecl const*, std::string&) const + 107 10 clang 0x00000001001f3f50 (anonymous namespace)::CGObjCCommonMac::GetMethodVarType(clang::ObjCMethodDecl const*) + 54 11 clang 0x00000001001f4441 (anonymous namespace)::CGObjCMac::GetMethodConstant(clang::ObjCMethodDecl const*) + 239 12 clang 0x0000000100205cda (anonymous namespace)::CGObjCMac::GenerateClass(clang::ObjCImplementationDecl const*) + 1308 13 clang 0x0000000100240ef0 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 768 14 clang 0x000000010024cbff (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 121 15 clang 0x0000000100234dd3 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 167 16 clang 0x00000001002569d2 clang::ParseAST(clang::Sema&, bool) + 306 17 clang 0x0000000100233fb0 clang::CodeGenAction::ExecuteAction() + 862 18 clang 0x0000000100039082 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 958 19 clang 0x0000000100023b91 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2193 20 clang 0x000000010001e03b cc1_main(char const**, char const**, char const*, void*) + 2939 21 clang 0x0000000100020be0 main + 640 22 clang 0x000000010001d4b4 start + 52 23 clang 0x0000000000000029 start + 18446744069414464425 Stack dump: 0. Program arguments: /Users/marshall/code/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang -cc1 -triple i386-apple-macosx10.7.1 -emit-obj -mrelax-all -disable-free -main-file-name browser_webview_mac-rPF6f7.mii -pic-level 1 -mdisable-fp-elim -masm-verbose -target-cpu yonah -target-linker-version 97.14 -coverage-file browser_webview_mac-rPF6f7.o -resource-dir /Users/marshall/code/chromium/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.0 -fdeprecated-macro -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-exceptions -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o browser_webview_mac-rPF6f7.o -x objective-c++-cpp-output /var/folders/65/gqj_ckvs0dg7ydj4qy9hj1200000gn/T/browser_webview_mac-rPF6f7.mii 1. <eof> parser at end of file 2. /Users/marshall/code/chromium/src/cef/libcef/browser_webview_mac.mm:25:1: LLVM IR generation of declaration 'BrowserWebView::initWithFrame:' clang: error: unable to execute command: Illegal instruction: 4 clang: error: clang frontend command failed due to signal 2 (use -v to see invocation) clang: note: diagnostic msg: Please submit a bug report to http://llvm.org/bugs/ and include command line arguments and all diagnostic information. clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
The browser_webview_mac-rPF6f7.mii file is available here: http://www.magpcss.net/patches/browser_webview_mac-rPF6f7.mii
Still happening with trunk (r140347). Reducing…
The failing assert was added by Argyrios in r131446.
cloned to <rdar://problem/10172840>
Created attachment 7333 [details] reduced repro
Created attachment 7334 [details] Patch This seems to fix the problem, but I'm not sure it's the right fix.
Created attachment 7335 [details] test case that shows that the previous patch attempt is wrong Better test case.
Created attachment 7336 [details] test case that shows that the previous patch attempt is wrong
Fixed at r140542.