[LLVMbugs] [Bug 20612] New: Segmentation fault with -O2 -g
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Aug 10 20:26:50 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20612
Bug ID: 20612
Summary: Segmentation fault with -O2 -g
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: AArch64
Assignee: unassignedbugs at nondot.org
Reporter: liujiangning1 at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 12875
--> http://llvm.org/bugs/attachment.cgi?id=12875&action=edit
a test case to expose failure
Hi,
For the test case below,
{code}
void f (int *);
int test_dgi (void)
{
int arg1[4];
int prod[4 * 2];
int carry;
int i, j, k;
f (arg1);
for (i = 0; i < 4; i++)
{
carry = 0;
for (j = 0; j < 4; j++)
{
k = i + j;
carry += arg1[i] * arg1[j];
carry += prod[k];
prod[k] = (carry >> 1);
}
}
return 0;
}
{code}
we have compile-time segmentation failure with command line option
clang -O2 -target arm64-linux-gnueabi ff_i.c -g
But the case can build pass, if "-g" is removed.
Attached .ll file is generated by "clang -mtriple=arm64-linux-gnueabi -O2 -g -S
-emit-llvm". With command line option "llc -O2 -mtriple=arm64-linux-gnueabi
ff_i_g.ll", we have the following failure,
llc: /home/jialiu01/llvm/review/llvm/lib/CodeGen/MachineTraceMetrics.cpp:628:
<anonymous namespace>::DataDep::DataDep(const llvm::MachineRegisterInfo *,
unsigned int, unsigned int): Assertion `!DefI.atEnd() && "Register has no
defs"' failed.
0 libLLVMSupport.so 0x00007f95ac04f15e llvm::sys::PrintStackTrace(_IO_FILE*) +
46
1 libLLVMSupport.so 0x00007f95ac04f41b
2 libLLVMSupport.so 0x00007f95ac04f68e
3 libpthread.so.0 0x00007f95aad17bb0
4 libc.so.6 0x00007f95a9f3df77 gsignal + 55
5 libc.so.6 0x00007f95a9f415e8 abort + 328
6 libc.so.6 0x00007f95a9f36d43
7 libc.so.6 0x00007f95a9f36df2
8 libLLVMCodeGen.so 0x00007f95acfcfc12
9 libLLVMCodeGen.so 0x00007f95acfcaf05
10 libLLVMCodeGen.so 0x00007f95acfca78e
llvm::MachineTraceMetrics::Ensemble::computeInstrDepths(llvm::MachineBasicBlock
const*) + 1438
11 libLLVMCodeGen.so 0x00007f95acfcd1da
llvm::MachineTraceMetrics::Ensemble::getTrace(llvm::MachineBasicBlock const*) +
42
12 libLLVMCodeGen.so 0x00007f95acf1c6a3
13 libLLVMCodeGen.so 0x00007f95acf1c3bc
14 libLLVMCodeGen.so 0x00007f95acf43dee
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 110
15 libLLVMCore.so 0x00007f95acb0f06b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 427
16 libLLVMCore.so 0x00007f95acb0f378
llvm::FPPassManager::runOnModule(llvm::Module&) + 104
17 libLLVMCore.so 0x00007f95acb0fa4a
18 libLLVMCore.so 0x00007f95acb0f62e
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 302
19 libLLVMCore.so 0x00007f95acb0fef1
llvm::legacy::PassManager::run(llvm::Module&) + 33
20 llc 0x000000000040ff57
21 llc 0x000000000040f0c2 main + 226
22 libc.so.6 0x00007f95a9f28de5 __libc_start_main + 245
23 llc 0x000000000040edc5
Stack dump:
0. Program arguments: /home/jialiu01/llvm/review/build/bin/llc -O2
-mtriple=arm64-linux-gnueabi ff_i_g.ll
1. Running pass 'Function Pass Manager' on module 'ff_i_g.ll'.
2. Running pass 'Machine InstCombiner' on function '@test_dgi'
Aborted (core dumped)
--
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/20140811/8d1e3679/attachment.html>
More information about the llvm-bugs
mailing list