[LLVMbugs] [Bug 19555] New: Segmentation fault in llvm::InstrEmitter::getVR
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 25 04:30:36 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19555
Bug ID: 19555
Summary: Segmentation fault in llvm::InstrEmitter::getVR
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: asolokha at gmx.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 12442
--> http://llvm.org/bugs/attachment.cgi?id=12442&action=edit
Reduced bitcode
LLVM 3.4 crashes when compiling the following reduced testcase w/ clang at
optimization level -O1 and above:
void
k(void)
{
static int n;
static int h;
volatile int p;
++n;
n = p * (!(++h));
}
% clang -c -O1 8a5da732.c
0 libLLVM-3.4.so 0x00007f2bd97eb962 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 libLLVM-3.4.so 0x00007f2bd97eb73c
2 libpthread.so.0 0x00007f2bd87f51b0
3 libLLVM-3.4.so 0x00007f2bd9863d34 llvm::InstrEmitter::getVR(llvm::SDValue,
llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>
>&) + 148
4 libLLVM-3.4.so 0x00007f2bd9863ec6
llvm::InstrEmitter::AddRegisterOperand(llvm::MachineInstrBuilder&,
llvm::SDValue, unsigned int, llvm::MCInstrDesc const*,
llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>
>&, bool, bool, bool) + 86
5 libLLVM-3.4.so 0x00007f2bd9864e8b
llvm::InstrEmitter::AddOperand(llvm::MachineInstrBuilder&, llvm::SDValue,
unsigned int, llvm::MCInstrDesc const*, llvm::DenseMap<llvm::SDValue, unsigned
int, llvm::DenseMapInfo<llvm::SDValue> >&, bool, bool, bool) + 475
6 libLLVM-3.4.so 0x00007f2bd98684f3
llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool, bool,
llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo<llvm::SDValue>
>&) + 515
7 libLLVM-3.4.so 0x00007f2bd98f49d1
llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineBasicBlock::bundle_iterator<llvm::MachineInstr,
llvm::ilist_iterator<llvm::MachineInstr> >&) + 737
8 libLLVM-3.4.so 0x00007f2bd9959c9b
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 635
9 libLLVM-3.4.so 0x00007f2bd995b659
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1065
10 libLLVM-3.4.so 0x00007f2bd995c8a1
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 993
11 libLLVM-3.4.so 0x00007f2bd8fddda9
llvm::FPPassManager::runOnFunction(llvm::Function&) + 473
12 libLLVM-3.4.so 0x00007f2bd8fdde3b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
13 libLLVM-3.4.so 0x00007f2bd8fe02e9
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 697
14 clang 0x00000000007de14e
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 2862
15 clang 0x00000000007db801
16 clang 0x0000000000962e33 clang::ParseAST(clang::Sema&, bool, bool)
+ 563
17 clang 0x000000000066b789 clang::FrontendAction::Execute() + 153
18 clang 0x0000000000649534
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1076
19 clang 0x0000000000631316
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1622
20 clang 0x000000000062cf38 cc1_main(char const**, char const**, char
const*, void*) + 1128
21 clang 0x000000000062b5a5 main + 7621
22 libc.so.6 0x00007f2bd8463a65 __libc_start_main + 245
23 clang 0x000000000062be0f
Stack dump:
0. Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -disable-free -disable-llvm-verifier -main-file-name 8a5da732.c
-mrelocation-model static -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.24
-momit-leaf-frame-pointer -coverage-file /home/asolokha/8a5da732.o
-resource-dir /usr/bin/../lib/clang/3.4 -internal-isystem /usr/local/include
-internal-isystem /usr/bin/../lib/clang/3.4/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O1 -fdebug-compilation-dir
/home/asolokha -ferror-limit 19 -fmessage-length 136 -mstackrealign
-fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-slp -o 8a5da732.o -x c
8a5da732.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '8a5da732.c'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@k'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140425/662bc292/attachment.html>
More information about the llvm-bugs
mailing list