clang: error: compiler command failed due to signal 6

$ clang --version
clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/trunk 77666)
Target: i386-apple-darwin9
Thread model: posix

$ cat test.c
#include <Carbon/Carbon.h>
void test()
{
  UnsignedWide usw;
}

$ clang -c test.c
$ clang -c test.c -g
0 clang-cc 0x00f77718 main + 16196104
1 clang-cc 0x00f77c9a main + 16197514
2 libSystem.B.dylib 0x910722bb _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1861803375
4 clang-cc 0x00b3a199 main + 11750537
5 clang-cc 0x00b36b3e main + 11736622
6 clang-cc 0x00b35b67 main + 11732567
7 clang-cc 0x00b36727 main + 11735575
8 clang-cc 0x00b36edc main + 11737548
9 clang-cc 0x00b3a09c main + 11750284
10 clang-cc 0x00b36b3e main + 11736622
11 clang-cc 0x00b3a77b main + 11752043
12 clang-cc 0x00b3adf1 main + 11753697
13 clang-cc 0x00b3af2d main + 11754013
14 clang-cc 0x00b3b225 main + 11754773
15 clang-cc 0x00b47d1c main + 11806732
16 clang-cc 0x00818bbf main + 8468143
17 clang-cc 0x00b9eef8 main + 12163560
18 clang-cc 0x00ee6295 main + 15601029
19 clang-cc 0x00ee6570 main + 15601760
20 clang-cc 0x00ee6788 main + 15602296
21 clang-cc 0x00019788 main + 82552
22 clang-cc 0x0001a4f5 main + 85989
23 clang-cc 0x0028e44f main + 2658111
24 clang-cc 0x00004bc2 _mh_execute_header + 15298
25 clang-cc 0x000071b9 main + 7337
26 clang-cc 0x00001a36 _mh_execute_header + 2614
Stack dump:
0. Program arguments: clang-cc -triple i386-apple-darwin9 -S -disable-free -main-file-name test.c --relocation-model pic -pic-level=1 --disable-fp-elim --unwind-tables=0 --mcpu=yonah --fmath-errno=0 -mmacosx-version-min=10.5.0 -g -fdiagnostics-show-option -o /var/folders/88/88AKX+F62RWmd++8ZOxBkU+++TI/-Tmp-/cc-hyGotT.s -x c test.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'X86 AT&T-Style Assembly Printer' on function '@test'
clang: error: compiler command failed due to signal 6 (use -v to see invocation)

The clang error is accompanied by a crash of ReportCrash itself:

Process: ReportCrash [24612]
Path: /System/Library/CoreServices/ReportCrash
...
Thread 1 Crashed:
0 com.apple.Symbolication 0x000d027d d_print_comp + 12
1 com.apple.Symbolication 0x000d1f66 d_print_comp + 7413
2 com.apple.Symbolication 0x000d0dd7 d_print_comp + 2918
3 com.apple.Symbolication 0x000d0dd7 d_print_comp + 2918
4 com.apple.Symbolication 0x000d0dd7 d_print_comp + 2918

Robert P.

I can also reproduce this with no problem. Devang, I get this crash, can you take a look?

-Chris

Assertion failed: (I != CompileUnitMap.end() && "Missing compile unit."), function FindCompileUnit, file DwarfDebug.cpp, line 922.

Program received signal SIGABRT, Aborted.
0x93565e42 in __kill ()
(gdb) bt
#0 0x93565e42 in __kill ()
#1 0x93565e34 in kill$UNIX2003 ()
#2 0x935d823a in raise ()
#3 0x935e4679 in abort ()
#4 0x935d93db in __assert_rtn ()
#5 0x00bac0a1 in llvm::DwarfDebug::FindCompileUnit (this=0x43b8e00, Unit={<llvm::DIDescriptor> = {DbgGV = 0x2a5104c}, <No data fields>}) at DwarfDebug.cpp:922
#6 0x00baf4e4 in llvm::DwarfDebug::AddSourceLine (this=0x43b8e00, Die=0xbfffdd80, Ty=0xbfffded4) at DwarfDebug.cpp:490
#7 0x00bb25d9 in llvm::DwarfDebug::ConstructTypeDIE (this=0x43b8e00, DW_Unit=0x2a5ab40, Buffer=@0xbfffdd80, DTy=@0xbfffded4) at DwarfDebug.cpp:616
#8 0x00bb0487 in llvm::DwarfDebug::AddType (this=0x43b8e00, DW_Unit=0x2a5ab40, Entity=0x2a5bda0, Ty=@0xbfffdf4c) at DwarfDebug.cpp:546
#9 0x00bb15b1 in llvm::DwarfDebug::CreateMemberDIE (this=0x43b8e00, DW_Unit=0x2a5ab40, DT=@0xbfffe010) at DwarfDebug.cpp:813
#10 0x00bb2277 in llvm::DwarfDebug::ConstructTypeDIE (this=0x43b8e00, DW_Unit=0x2a5ab40, Buffer=@0xbfffe080, CTy=@0xbfffe1dc) at DwarfDebug.cpp:684
#11 0x00bb0539 in llvm::DwarfDebug::AddType (this=0x43b8e00, DW_Unit=0x2a5ab40, Entity=0xbfffe280, Ty=@0xbfffe238) at DwarfDebug.cpp:549
#12 0x00bb252e in llvm::DwarfDebug::ConstructTypeDIE (this=0x43b8e00, DW_Unit=0x2a5ab40, Buffer=@0xbfffe280, DTy=@0xbfffe3d4) at DwarfDebug.cpp:604
#13 0x00bb0487 in llvm::DwarfDebug::AddType (this=0x43b8e00, DW_Unit=0x2a5ab40, Entity=0x2a5bb80, Ty=@0xbfffe44c) at DwarfDebug.cpp:546
#14 0x00bb075e in llvm::DwarfDebug::CreateDbgScopeVariable (this=0x43b8e00, DV=0x2a5b680, Unit=0x2a5ab40) at DwarfDebug.cpp:957
#15 0x00bb08a8 in llvm::DwarfDebug::ConstructDbgScope (this=0x43b8e00, ParentScope=0x2a5b4d0, ParentStartID=0, ParentEndID=0, ParentDie=0x2a5abc0, Unit=0x2a5ab40) at DwarfDebug.cpp:1013
#16 0x00bb0f59 in llvm::DwarfDebug::ConstructFunctionDbgScope (this=0x43b8e00, RootScope=0x2a5b4d0, AbstractScope=false) at DwarfDebug.cpp:1118
#17 0x00bb4210 in llvm::DwarfDebug::EndFunction (this=0x43b8e00, MF=0x2a5af60) at DwarfDebug.cpp:1481
#18 0x00bcde2b in llvm::DwarfWriter::EndFunction (this=0x2a58290, MF=0x2a5af60) at DwarfWriter.cpp:66
#19 0x0089332b in llvm::X86ATTAsmPrinter::runOnMachineFunction (this=0x2a59e30, MF=@0x2a5af60) at X86ATTAsmPrinter.cpp:282
#20 0x00c1a6e6 in llvm::MachineFunctionPass::runOnFunction (this=0x2a59e30, F=@0x2a4d600) at MachineFunction.cpp:45
#21 0x00eea5e0 in llvm::FPPassManager::runOnFunction (this=0x2a56d40, F=@0x2a4d600) at PassManager.cpp:1372
#22 0x00eea850 in llvm::FunctionPassManagerImpl::run (this=0x2a56b40, F=@0x2a4d600) at PassManager.cpp:1324
#23 0x00eea964 in llvm::FunctionPassManager::run (this=0x2a35360, F=@0x2a4d600) at PassManager.cpp:1254
#24 0x00023227 in (anonymous namespace)::BackendConsumer::EmitAssembly (this=0x2a03c50) at Backend.cpp:359
#25 0x0002431f in (anonymous namespace)::BackendConsumer::HandleTranslationUnit (this=0x2a03c50, C=@0x3011000) at Backend.cpp:149
#26 0x0023a100 in clang::ParseAST (PP=@0x2a05fa0, Consumer=0x2a03c50, Ctx=@0x3011000, PrintStats=false, CompleteTranslationUnit=true) at ParseAST.cpp:77
#27 0x00005e76 in ProcessInputFile (PP=@0x2a05fa0, PPF=@0xbffff254, InFile=@0x2a05b40, PA=EmitAssembly, Features=@0xbffff27c, Context=@0x2a01170) at clang-cc.cpp:2053
#28 0x0000755b in main (argc=22, argv=0xbffff368) at clang-cc.cpp:2309

OK. I can reproduce it. Stay tuned.

Fixed. rev. 77694.
Sorry for the breakage.