clang: error: unable to execute command: Segmentation fault (core dumped)

Hi All,

I am building and installing the cloud9 symbolic execution engine in VMware, Ubuntu 12.04 machine. And in the middle of compiling process I got error like this

clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)

Please help me, trying this for couple of days but no luck…

Thank-you

Krish

What version of clang are you using? Clang should generate a crash report with preprocessed file and invocation script that reproduces the bug, do you have this?

Hi, Actually, I don’t know what version of clang is that, because I just followed this in the cloud9 (Setting Up - Cloud9 - Automated Software Testing at Scale) $ cd $CLOUD9_ROOT $ gclient config --name src git+https://github.com/dslab-epfl/cloud9-depot.git $ gclient sync so when I run the gclient sync it will download LLVM+clang and build it. And I don’t have any bug report that prdouce by clang. But when I run the make command again inside the klee folder I got the same problem krishan@ubuntu:~/cloud9/src/klee-uclibc$ sudo make [sudo] password for krishan: clang: clang: warning: argument unused during compilation: '-flto’warning: clang: warning: argument unused during compilation: ‘-dN’ argument unused during compilation: ‘-flto’ CC libcrypt/des.os 0 clang 0x0000000001c28bb2 1 clang 0x0000000001c29043 2 libpthread.so.0 0x00002ac1bbcd7cb0 3 clang 0x00000000007cb641 clang::CodeGen::CGDebugInfo::getCompletedTypeOrNull(clang::QualType) + 177 4 clang 0x00000000007c1d88 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 72 5 clang 0x00000000007c562c clang::CodeGen::CGDebugInfo::CreateType(clang::FunctionType const*, llvm::DIFile) + 108 6 clang 0x00000000007cb811 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 337 7 clang 0x00000000007c1dcc clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 140 8 clang 0x00000000007cd041 clang::CodeGen::CGDebugInfo::getOrCreateFunctionType(clang::Decl const*, clang::QualType, llvm::DIFile) + 849 9 clang 0x00000000007cd6d8 clang::CodeGen::CGDebugInfo::EmitFunctionStart(clang::GlobalDecl, clang::QualType, llvm::Function*, llvm::IRBuilder

Hi,&nbsp;<div><br></div><div>sorry for the last email.</div><div><br></div><div><span style="font-size:11.0pt;line-height:107%;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:&quot;Times New Roman&quot;;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">Actually,
I don't know what version of clang is that, because I just followed this in the
cloud9 (Setting Up - Cloud9 - Automated Software Testing at Scale)</span></div><div><span style="font-size:11.0pt;line-height:107%;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:&quot;Times New Roman&quot;;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA"><br></span></div><div><span style="font-size:11.0pt;line-height:107%;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:&quot;Times New Roman&quot;;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">&nbsp;</span></div><div><span style="font-size:11.0pt;line-height:107%;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:&quot;Times New Roman&quot;;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">$
cd $CLOUD9_ROOT</span></div><div><span style="font-size:11.0pt;line-height:107%;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:&quot;Times New Roman&quot;;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">$
gclient config --name src git+https://github.com/dslab-epfl/cloud9-depot.git&nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size:11.0pt;line-height:107%;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:&quot;Times New Roman&quot;;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">$
gclient sync&nbsp;</span></div><div><span style="font-size: 15px; line-height: 15.6933336257935px;"><font face="Calibri, sans-serif"><br></font></span></div><div><span style="font-size:11.0pt;line-height:107%;
font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:&quot;Times New Roman&quot;;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">so
when I run the gclient sync it will download LLVM+clang and build it. And I
don't have any bug report that prdouce by clang. But when I run the make
command again inside the klee folder I got the same&nbsp; problem</span></div><div><br></div><div><br></div><div><span style="font-size: 15px; line-height: 15.6933336257935px;"><font face="Calibri, sans-serif">output :</font></span></div><div><span style="font-size: 15px; line-height: 15.6933336257935px;"><font face="Calibri, sans-serif"><br></font></span></div><div><span style="font-size: 15px; line-height: 15.6933336257935px;"><font face="Calibri, sans-serif"><br></font></span><div>krishan@ubuntu:~/cloud9/src/klee-uclibc$ sudo make</div><div>[sudo] password for krishan:&nbsp;</div><div>Sorry, try again.</div><div>[sudo] password for krishan:&nbsp;</div><div>clang: clang: warning: argument unused during compilation: '-flto'warning:&nbsp;</div><div>clang: warning: argument unused during compilation: '-dN'</div><div>argument unused during compilation: '-flto'</div><div>&nbsp; CC libcrypt/des.os</div><div>0 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000001c28bb2</div><div>1 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000001c29043</div><div>2 &nbsp;libpthread.so.0 0x00002ac1bbcd7cb0</div><div>3 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000007cb641 clang::CodeGen::CGDebugInfo::getCompletedTypeOrNull(clang::QualType) + 177</div><div>4 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000007c1d88 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 72</div><div>5 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000007c562c clang::CodeGen::CGDebugInfo::CreateType(clang::FunctionType const*, llvm::DIFile) + 108</div><div>6 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000007cb811 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 337</div><div>7 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000007c1dcc clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 140</div><div>8 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000007cd041 clang::CodeGen::CGDebugInfo::getOrCreateFunctionType(clang::Decl const*, clang::QualType, llvm::DIFile) + 849</div><div>9 &nbsp;clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000007cd6d8 clang::CodeGen::CGDebugInfo::EmitFunctionStart(clang::GlobalDecl, clang::QualType, llvm::Function*, llvm::IRBuilder&lt;true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter&lt;true&gt; &gt;&amp;) + 1656</div><div>10 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000000088fb3c clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl, clang::QualType, llvm::Function*, clang::CodeGen::CGFunctionInfo const&amp;, clang::CodeGen::FunctionArgList const&amp;, clang::SourceLocation) + 1388</div><div>11 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000000890936 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&amp;) + 470</div><div>12 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000000077178c clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl) + 3228</div><div>13 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000000076e754 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 260</div><div>14 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000007698ff</div><div>15 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000000768b97</div><div>16 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x00000000008b67a3 clang::ParseAST(clang::Sema&amp;, bool, bool) + 291</div><div>17 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000000627a6d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&amp;) + 893</div><div>18 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000000060fcd8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2728</div><div>19 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000000605078 cc1_main(char const**, char const**, char const*, void*) + 664</div><div>20 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x000000000060c1ae main + 3678</div><div>21 libc.so.6 &nbsp; &nbsp; &nbsp; 0x00002ac1bc92076d __libc_start_main + 237</div><div>22 clang &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0x0000000000604d05</div><div>Stack dump:</div><div>0.<span class="Apple-tab-span" style="white-space:pre"> </span>Program arguments: /home/krishan/cloud9/src/third_party/llvm-build/Release+Asserts/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -disable-free -main-file-name des.c -pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.22 -momit-leaf-frame-pointer -g -coverage-file libcrypt/des.os -nostdsysteminc -nobuiltininc -resource-dir /home/krishan/cloud9/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.1 -isystem /usr/include/x86_64-linux-gnu -include ./include/libc-symbols.h -isystem .//../third_party/llvm-build/Release+Asserts/lib/clang/3.1/include -D STATIC -D NDEBUG -D NOT_IN_libc -D IS_IN_libcrypt -I ./include -I . -I /usr/include/ -fmodule-cache-path /var/tmp/clang-module-cache -O0 -Wall -Wstrict-prototypes -std=gnu99 -fdebug-compilation-dir /home/krishan/cloud9/src/klee-uclibc -ferror-limit 19 -fmessage-length 80 -mstackrealign -fno-builtin -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o libcrypt/des.os -x c libcrypt/des.c&nbsp;</div><div>1.<span class="Apple-tab-span" style="white-space:pre"> </span>libcrypt/des.c:642:1: current parser token 'char'</div><div>2.<span class="Apple-tab-span" style="white-space:pre"> </span>libcrypt/des.c:620:1: LLVM IR generation of declaration 'encrypt'</div><div>3.<span class="Apple-tab-span" style="white-space:pre"> </span>libcrypt/des.c:620:1: Generating code for declaration 'encrypt'</div><div>clang: error: unable to execute command: Segmentation fault (core dumped)</div><div>clang: error: clang frontend command failed due to signal (use -v to see invocation)</div><div>clang: note: diagnostic msg: Please submit a bug report to http://llvm.org/bugs/ and include command line arguments and all diagnostic information.</div><div>clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:</div><div>clang: note: diagnostic msg: /tmp/des-6nf870.i</div><div>clang: note: diagnostic msg: /tmp/des-6nf870.sh</div><div>make: *** [libcrypt/des.os] Error 254</div><div>krishan@ubuntu:~/cloud9/src/klee-uclibc$</div><div><br></div><div><br></div><div><br></div><div>Please help me</div><div><br></div><div>Thanks.</div><div><br></div><div>Krish</div>________________________________<br>&gt; From: popizdeh@gmail.com <br>&gt; Date: Fri, 19 Sep 2014 13:01:29 +1000 <br>&gt; Subject: Re: [cfe-dev] clang: error: unable to execute command: <br>&gt; Segmentation fault (core dumped) <br>&gt; To: krishan22@hotmail.com <br>&gt; CC: cfe-dev@cs.uiuc.edu <br>&gt; <br>&gt; What version of clang are you using? Clang should generate a crash <br>&gt; report with preprocessed file and invocation script that reproduces the <br>&gt; bug, do you have this? <br>&gt; <br>&gt; On Fri, Sep 19, 2014 at 11:18 AM, Krishanthan Krishnamoorthy <br>&gt; &lt;krishan22@hotmail.com&lt;mailto:krishan22@hotmail.com>> wrote: <br>&gt; Hi All, <br>&gt; <br>&gt; I am building and installing the cloud9 symbolic execution engine in <br>&gt; VMware, Ubuntu 12.04 machine. And in the middle of compiling process I <br>&gt; got error like this <br>&gt; <br>&gt; clang: error: unable to execute command: Segmentation fault (core dumped) <br>&gt; clang: error: clang frontend command failed due to signal (use -v to <br>&gt; see invocation) <br>&gt; <br>&gt; Please help me, trying this for couple of days but no luck.. <br>&gt; <br>&gt; Thank-you <br>&gt; <br>&gt; Krish <br>&gt; <br>&gt; _______________________________________________ <br>&gt; cfe-dev mailing list <br>&gt; cfe-dev@cs.uiuc.edu&lt;mailto:cfe-dev@cs.uiuc.edu> <br>&gt; http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev <br>&gt; <br>&gt; <br></div>

clang --version will tell you the version. The rest of your emails was unreadable :slight_smile: