Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling LLVM crashes under GCC 4.7 #2641

Closed
elliottslaughter opened this issue Jun 18, 2012 · 6 comments
Closed

Compiling LLVM crashes under GCC 4.7 #2641

elliottslaughter opened this issue Jun 18, 2012 · 6 comments
Labels
O-linux Operating system: Linux
Milestone

Comments

@elliottslaughter
Copy link
Contributor

When compiling LLVM (as a part of compiling rust), I noticed a crash while clang was attempting to bootstrap. I believe this is fixed in the latest LLVM trunk. The complete build log is included below.

  COMPILE:   clang_linux/full-i386/i386: /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/absvdi2.c
  COMPILE:   clang_linux/full-i386/i386: /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/absvsi2.c
  COMPILE:   clang_linux/full-i386/i386: /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/absvti2.c
  COMPILE:   clang_linux/full-i386/i386: /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/adddf3.c
0  clang     0x0000000001affd52
1  clang     0x0000000001b00279
2  libc.so.6 0x00007f24cbbb5cb0
3  clang     0x0000000000e9939a
4  clang     0x0000000000e9a843
5  clang     0x0000000000e9cd42 clang::runUninitializedVariablesAnalysis(clang::DeclContext const&, clang::CFG const&, clang::AnalysisDeclContext&, clang::UninitVariablesHandler&, clang::UninitVariablesAnalysisStats&) + 1586
6  clang     0x0000000000c98863 clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy, clang::sema::FunctionScopeInfo*, clang::Decl const*, clang::BlockExpr const*) + 947
7  clang     0x00000000009f4a48 clang::Sema::PopFunctionScopeInfo(clang::sema::AnalysisBasedWarnings::Policy const*, clang::Decl const*, clang::BlockExpr const*) + 328
8  clang     0x0000000000a824ba clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) + 506
9  clang     0x00000000009d28c7 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 183
10 clang     0x000000000097d21c clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 1148
11 clang     0x0000000000988160 clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1008
12 clang     0x0000000000977792 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&, clang::AccessSpecifier) + 146
13 clang     0x0000000000977d62 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::AccessSpecifier) + 786
14 clang     0x000000000097c0d6 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::Parser::ParsingDeclSpec*) + 2438
0  clang     0x0000000001affd52
15 clang     0x000000000097c2d2 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 194
1  clang     0x0000000001b00279
16 clang     0x0000000000974ffc 2  libc.so.6 0x00007f1abf512cb0
clang::ParseAST(clang::Sema&, bool, bool) + 268
17 clang     0x00000000008415be 3  clang     0x0000000000e9939a
4  clang     0x0000000000e9a843
5  clang     0x0000000000e9cd42 clang::runUninitializedVariablesAnalysis(clang::DeclContext const&, clang::CFG const&, clang::AnalysisDeclContext&, clang::UninitVariablesHandler&, clang::UninitVariablesAnalysisStats&) + 1586
6  clang     0x0000000000c98863 clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy, clang::sema::FunctionScopeInfo*, clang::Decl const*, clang::BlockExpr const*) + 947
7  clang     0x00000000009f4a48 clang::Sema::PopFunctionScopeInfo(clang::sema::AnalysisBasedWarnings::Policy const*, clang::Decl const*, clang::BlockExpr const*) + 328
8  clang     0x0000000000a824ba clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) + 506
9  clang     0x00000000009d28c7 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 183
10 clang     0x000000000097d21c clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 1148
11 clang     0x0000000000988160 clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1008
12 clang     0x0000000000977792 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&, clang::AccessSpecifier) + 146
13 clang     0x0000000000977d62 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::AccessSpecifier) + 786
14clang::CodeGenAction::ExecuteAction() + 62
18 clang     0x00000000006f30f4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 340
19 clang     0x00000000006d9b22 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1090
20 clang     0x00000000006d3071 cc1_main(char const**, char const**, char const*, void*) + 8465
21 clang     0x00000000006c677d main + 7757
22 libc.so.6 0x00007f24cbba2455 __libc_start_main + 245
23 clang     0x00000000006d03a9
Stack dump:
0.  Program arguments: /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/clang -cc1 -triple i386-unknown-linux-gnu -emit-obj -disable-free -main-file-name absvdi2.c -pic-level 2 -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.0.20120323 -momit-leaf-frame-pointer -coverage-file /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvdi2.o -resource-dir /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/../lib/clang/3.2 -isysroot /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/usr/local/include -internal-isystem /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/../lib/clang/3.2/include -internal-externc-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/include -internal-externc-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/usr/include -O3 -Wall -Werror -fdebug-compilation-dir /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt -ferror-limit 19 -fmessage-length 177 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvdi2.o -x c /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/absvdi2.c 
1.  <eof> parser at end of file
2.  /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/absvdi2.c:23:1: parsing function body '__absvdi2'
  COMPILE:   clang_linux/full-i386/i386: /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/addsf3.c
 clang     0x000000000097c0d6 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::Parser::ParsingDeclSpec*) + 2438
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see invocation)
15clang: note: diagnostic msg: Please submit a bug report to http://llvm.org/bugs/ and include command line arguments and all diagnostic information.
 clang     0x000000000097c2d2 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 194
16 clang     0x0000000000974ffc clang::ParseAST(clang::Sema&, bool, bool) + 268
17 clang     0x00000000008415be clang::CodeGenAction::ExecuteAction() + 62
18 clang     0x00000000006f30f4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 340
19 clang     0x00000000006d9b22 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1090
20 clang     0x00000000006d3071 cc1_main(char const**, char const**, char const*, void*) + 8465
0  clang     0x0000000001affd52
21 clang     0x00000000006c677d main + 7757
22 libc.so.6 0x00007f1abf4ff455 __libc_start_main + 245
1  clang     0x0000000001b00279
2  libc.so.6 0x00007f1d9b759cb0
23 clang     0x00000000006d03a9
Stack dump:
0.  Program arguments: /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/clang -cc1 -triple3  clang     0x0000000000e9939a
 i386-unknown-linux-gnu -emit-obj -disable-free -main-file-name absvsi2.c -pic-level 2 -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.0.20120323 -momit-leaf-frame-pointer -coverage-file /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvsi2.o -resource-dir 4  clang     0x0000000000e9a843
/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/../lib/clang/3.2 -isysroot /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/usr/local/include -internal-isystem /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/../lib/clang/3.2/include -internal-externc-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/include -internal-externc-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/usr/include -O3 -Wall -Werror -fdebug-compilation-dir5  clang     0x0000000000e9cd42  /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rtclang::runUninitializedVariablesAnalysis(clang::DeclContext const&, clang::CFG const&, clang::AnalysisDeclContext&, clang::UninitVariablesHandler&, clang::UninitVariablesAnalysisStats&) + 1586
 -ferror-limit 19 -fmessage-length 177 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvsi2.o -x c /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/absvsi2.c 
1.  <eof> parser at end of file
2.  /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/absvsi2.c:23:1: parsing function body '__absvsi2'
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (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.
6  clang     0x0000000000c98863 clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy, clang::sema::FunctionScopeInfo*, clang::Decl const*, clang::BlockExpr const*) + 947
clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/absvdi2-dmjyTn.i
clang: note: diagnostic msg: /tmp/absvdi2-dmjyTn.sh
7  clang     0x00000000009f4a48 clang::Sema::PopFunctionScopeInfo(clang::sema::AnalysisBasedWarnings::Policy const*, clang::Decl const*, clang::BlockExpr const*) + 328
8  clang     0x0000000000a824ba clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) + 506
make[6]: *** [/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvdi2.o] Error 254
make[6]: *** Waiting for unfinished jobs....
9  clang     0x00000000009d28c7 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 183
10 clang     0x000000000097d21c clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 1148
11 clang     0x0000000000988160 clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1008
12 clang     0x0000000000977792 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&, clang::AccessSpecifier)clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/absvsi2-HrcSGo.i
 + 146
clang: note: diagnostic msg: /tmp/absvsi2-HrcSGo.sh
13 clang     0x0000000000977d62 0 make[6]: clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::AccessSpecifier)*** [/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvsi2.o] Error 254
 clang     0x0000000001affd52
1  clang     0x0000000001b00279
2  libc.so.6 0x00007f988ab2acb0
3  clang     0x0000000000e9939a
4  clang     0x0000000000e9a843
5  clang     0x0000000000e9cd42 clang::runUninitializedVariablesAnalysis(clang::DeclContext const&, clang::CFG const&, clang::AnalysisDeclContext&, clang::UninitVariablesHandler&, clang::UninitVariablesAnalysisStats&) + 1586
6  clang     0x0000000000c98863 clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy, clang::sema::FunctionScopeInfo*, clang::Decl const*, clang::BlockExpr const*) + 947
7  clang     0x00000000009f4a48 clang::Sema::PopFunctionScopeInfo(clang::sema::AnalysisBasedWarnings::Policy const*, clang::Decl const*, clang::BlockExpr const*) + 328
8  clang     0x0000000000a824ba clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool) + 506
9  clang     0x00000000009d28c7 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 183
10 clang     0x000000000097d21c clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 1148
11 clang     0x0000000000988160 clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1008
12 + 786
14 clang     0x000000000097c0d6 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::Parser::ParsingDeclSpec*) + 2438
15 clang     0x000000000097c2d2 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 194
16 clang     0x0000000000974ffc clang::ParseAST(clang::Sema&, bool, bool) + 268
17 clang     0x00000000008415be clang::CodeGenAction::ExecuteAction() + 62
18 clang     0x00000000006f30f4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 340
19 clang     0x00000000006d9b22 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1090
20 clang     0x00000000006d3071 cc1_main(char const**, char const**, char const*, void*) + 8465
21 clang     0x00000000006c677d main + 7757
22 libc.so.6 0x00007f1d9b746455 __libc_start_main + 245
23 clang     0x00000000006d03a9
Stack dump:
0.  Program arguments: /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/clang -cc1 -triple i386-unknown-linux-gnu -emit-obj -disable-free -main-file-name adddf3.c -pic-level 2 -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.0.20120323 -momit-leaf-frame-pointer -coverage-file /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/adddf3.o -resource-dir /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/../lib/clang/3.2 -isysroot /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/usr/local/include -internal-isystem /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/../lib/clang/3.2/include -internal-externc-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/include -internal-externc-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/usr/include -O3 -Wall -Werror -fdebug-compilation-dir /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt -ferror-limit 19 -fmessage-length 177 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/adddf3.o -x c /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/adddf3.c 
1.  /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/fp_lib.h:106:1: current parser token 'static'
2.  /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/fp_lib.h:73:73: parsing function body 'wideMultiply'
 clang     0x0000000000977792 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&, clang::AccessSpecifier) + 146
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (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.
13 clang     0x0000000000977d62 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::AccessSpecifier) + 786
14 clang     0x000000000097c0d6 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::Parser::ParsingDeclSpec*) + 2438
15 clang     0x000000000097c2d2 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 194
16 clang     0x0000000000974ffc clang::ParseAST(clang::Sema&, bool, bool) + 268
17 clang     0x00000000008415be clang::CodeGenAction::ExecuteAction() + 62
18 clang     0x00000000006f30f4 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 340
19 clang     0x00000000006d9b22 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1090
20 clang     0x00000000006d3071 cc1_main(char const**, char const**, char const*, void*) + 8465
21 clang     0x00000000006c677d main + 7757
22 libc.so.6 0x00007f988ab17455 __libc_start_main + 245
23 clang     0x00000000006d03a9
Stack dump:
0.  Program arguments: /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/clang -cc1 -triple i386-unknown-linux-gnu -emit-obj -disable-free -main-file-name addsf3.c -pic-level 2 -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.22.0.20120323 -momit-leaf-frame-pointer -coverage-file /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/addsf3.o -resource-dir /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/../lib/clang/3.2 -isysroot /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/usr/local/include -internal-isystem /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/../lib/clang/3.2/include -internal-externc-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/include -internal-externc-isystem /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/SDKs/linux/usr/include -O3 -Wall -Werror -fdebug-compilation-dir /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt -ferror-limit 19 -fmessage-length 177 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/addsf3.o -x c /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/addsf3.c 
1.  /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/fp_lib.h:106:1: current parser token 'static'
2.  /home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt/lib/fp_lib.h:42:73: parsing function body 'wideMultiply'
clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/adddf3-0buvkn.i
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang: note: clang: note: diagnostic msg: /tmp/adddf3-0buvkn.sh
diagnostic msg: Please submit a bug report to http://llvm.org/bugs/ and include command line arguments and all diagnostic information.
make[6]: *** [/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/adddf3.o] Error 254
clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/addsf3-sE7Ekq.i
clang: note: diagnostic msg: /tmp/addsf3-sE7Ekq.sh
make[6]: *** [/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/addsf3.o] Error 254
make[6]: Leaving directory `/home/sjcrane/elliott_temp_work/rust/src/llvm/projects/compiler-rt'
make[5]: *** [BuildRuntimeLibraries] Error 2
rm /home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/lib/clang/3.2/lib/linux/.dir
make[5]: Leaving directory `/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime/compiler-rt'
make[4]: *** [compiler-rt/.makeall] Error 2
make[4]: Leaving directory `/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang/runtime'
make[3]: *** [all] Error 1
make[3]: Leaving directory `/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools/clang'
make[2]: *** [clang/.makeall] Error 2
make[2]: Leaving directory `/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/tools'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu'
make: *** [/home/sjcrane/elliott_temp_work/rust/llvm/x86_64-unknown-linux-gnu/Release+Asserts/bin/llvm-config] Error 2
@ghost ghost assigned graydon Jun 21, 2012
@z0w0
Copy link
Contributor

z0w0 commented Jul 8, 2012

Can you try GCC 4.7.1? I have GCC 4.7.1 and I don't get this error. It might also be 64-bit only that fails.

Apparently a quick way to fix it is -fno-tree-pre (see here) when compiling clang. I don't know why it hasn't been fixed though, seeing as it looks like these bugs were fixed in 3.1 which is apparently the version of Rust's LLVM fork.

EDIT: I got this error when compiling with GCC 4.7.1 on an x86_64 system, too.

@jld
Copy link
Contributor

jld commented Jul 21, 2012

Looks like the fix is llvm-mirror/clang@b86b855 in the clang repo, if we want to cherry-pick it. It's also pulled up to the release_31 branch, but Rust seems to be currently using a snapshot of master (trunk) from about a week after 3.1 was branched (and a few days before the fix for this: llvm-mirror/clang@9b94cd1).

@jld
Copy link
Contributor

jld commented Jul 21, 2012

Or, to annotate my clearer explanation from IRC:

April 18th: 3.1 is branched. (llvm-mirror/clang@103f41d)
April 26th: Rust grabs trunk. (llvm-mirror/clang@9b94cd1)
April 30th: bug is fixed on trunk. (llvm-mirror/clang@b86b855)
May 8th: fix is crossported to 3.1. (llvm-mirror/clang@82520fb)

@SimonSapin
Copy link
Contributor

I got the same bug on ArchLinux 64bit with GCC 4.7.1

@graydon
Copy link
Contributor

graydon commented Jul 21, 2012

We're ought to advance our llvm and clang snapshots (and probably libuv too).

@graydon
Copy link
Contributor

graydon commented Jul 26, 2012

Took an LLVM bump with 668e2c8, just checked, we build ok with 4.7.1 now.

@graydon graydon closed this as completed Jul 26, 2012
RalfJung pushed a commit to RalfJung/rust that referenced this issue Nov 6, 2022
InitOnce: synchronize with completion when already complete

The completion of an InitOnce happens-before the threads waiting on it wake up. However, this is not the case for threads that call `InitOnceBeginInitialize` after the completion, leading to data races and outdated weak memory loads as observed in the CI for  rust-lang#2638. This PR fixes this.
Aaron1011 pushed a commit to Aaron1011/rust that referenced this issue Jan 6, 2023
InitOnce: synchronize with completion when already complete

The completion of an InitOnce happens-before the threads waiting on it wake up. However, this is not the case for threads that call `InitOnceBeginInitialize` after the completion, leading to data races and outdated weak memory loads as observed in the CI for  rust-lang#2638. This PR fixes this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-linux Operating system: Linux
Projects
None yet
Development

No branches or pull requests

5 participants