[LLVMbugs] [Bug 11656] New: switch block causes frontend to segfault
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 27 04:26:54 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11656
Bug #: 11656
Summary: switch block causes frontend to segfault
Product: clang
Version: 3.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: lazar6 at illinois.edu
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7806
--> http://llvm.org/bugs/attachment.cgi?id=7806
switchBlock.c
switchBlock.c attached.
$ clang --version
clang version 3.0 (tags/RELEASE_30/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang switchBlock.c
0 libLLVM-3.0.so 0x00007fd3d4f1883f
1 libLLVM-3.0.so 0x00007fd3d4f18e01
2 libpthread.so.0 0x00007fd3d4093850
3 libLLVM-3.0.so 0x00007fd3d48b7d13
llvm::SwitchInst::addCase(llvm::ConstantInt*, llvm::BasicBlock*) + 35
4 clang 0x00000000007b10ca
clang::CodeGen::CodeGenFunction::EmitCaseStmt(clang::CaseStmt const&) + 282
5 clang 0x00000000007b2c29
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 201
6 clang 0x00000000007aff13
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 35
7 clang 0x00000000007b29ef
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 239
8 clang 0x00000000007b2c5c
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 252
9 clang 0x00000000007aff13
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 35
10 clang 0x00000000007b1f3f
clang::CodeGen::CodeGenFunction::EmitDoStmt(clang::DoStmt const&) + 479
11 clang 0x00000000007b000b
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 283
12 clang 0x00000000007b0316
clang::CodeGen::CodeGenFunction::EmitSwitchStmt(clang::SwitchStmt const&) + 550
13 clang 0x00000000007affcb
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 219
14 clang 0x00000000007b29ef
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 239
15 clang 0x00000000007b2c5c
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 252
16 clang 0x00000000007aff13
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 35
17 clang 0x00000000007c065c
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 380
18 clang 0x00000000006d629b
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 427
19 clang 0x00000000006d6d93
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 371
20 clang 0x00000000006d72cd
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1293
21 clang 0x00000000006d7cab
22 clang 0x00000000006c536c
23 clang 0x00000000006c4e07
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 151
24 clang 0x00000000007db214 clang::ParseAST(clang::Sema&, bool) + 292
25 clang 0x00000000006c3e13 clang::CodeGenAction::ExecuteAction() +
51
26 clang 0x00000000005c9c3f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 319
27 clang 0x00000000005b251a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1114
28 clang 0x00000000005aa1a4 cc1_main(char const**, char const**, char
const*, void*) + 820
29 clang 0x00000000005a8b1c main + 620
30 libc.so.6 0x00007fd3d380314d __libc_start_main + 237
31 clang 0x00000000005a9d19
Stack dump:
0. Program arguments: /usr/bin/clang -cc1 -triple x86_64-unknown-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
switchBlock.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22.0.20111201 -momit-leaf-frame-pointer -resource-dir
/usr/bin/../lib/clang/3.0 -fmodule-cache-path /var/tmp/clang-module-cache
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.0/include -internal-externc-isystem /usr/include
-ferror-limit 19 -fmessage-length 128 -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/switchBlock-Cks1Vp.o -x c switchBlock.c
1. <eof> parser at end of file
2. switchBlock.c:1:5: LLVM IR generation of declaration 'main'
3. switchBlock.c:1:5: Generating code for declaration 'main'
4. switchBlock.c:1:15: LLVM IR generation of compound statement ('{}')
5. switchBlock.c:5:14: LLVM IR generation of compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
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: Preprocessed source(s) are located at:
clang: note: diagnostic msg: /tmp/switchBlock-fxFsAO.i
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list