[LLVMbugs] [Bug 11882] New: clang segfault
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jan 29 10:04:26 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11882
Bug #: 11882
Summary: clang segfault
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: chenyang at cs.utah.edu, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Valgrind thinks it's a null ptr deref.
[regehr at gamow tmp]$ clang -v
clang version 3.1 (trunk 149185)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp]$ clang -O2 -c -w small.c
0 clang 0x0000000001dcbb7f
1 clang 0x0000000001dcddf2
2 libpthread.so.0 0x00007ffff7bcf8f0
3 clang 0x0000000001bed347
llvm::ScalarEvolution::getSCEV(llvm::Value*) + 23
4 clang 0x0000000001be53ba
llvm::ScalarEvolution::ComputeLoadConstantCompareExitLimit(llvm::LoadInst*,
llvm::Constant*, llvm::Loop const*, llvm::CmpInst::Predicate) + 666
5 clang 0x0000000001be5a36
llvm::ScalarEvolution::ComputeExitLimitFromICmp(llvm::Loop const*,
llvm::ICmpInst*, llvm::BasicBlock*, llvm::BasicBlock*) + 918
6 clang 0x0000000001be5ee4
llvm::ScalarEvolution::ComputeExitLimitFromCond(llvm::Loop const*,
llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*) + 468
7 clang 0x0000000001be6437
llvm::ScalarEvolution::ComputeExitLimit(llvm::Loop const*, llvm::BasicBlock*) +
711
8 clang 0x0000000001be67b6
llvm::ScalarEvolution::ComputeBackedgeTakenCount(llvm::Loop const*) + 790
9 clang 0x0000000001be6d5e
llvm::ScalarEvolution::getBackedgeTakenInfo(llvm::Loop const*) + 718
10 clang 0x0000000001bfa239
llvm::ScalarEvolution::getBackedgeTakenCount(llvm::Loop const*) + 9
11 clang 0x00000000019cb775
12 clang 0x0000000001b86e44
llvm::LPPassManager::runOnFunction(llvm::Function&) + 1284
13 clang 0x0000000001d6aeeb
llvm::FPPassManager::runOnFunction(llvm::Function&) + 587
14 clang 0x0000000001b15a7d
15 clang 0x0000000001d6a9c1
llvm::MPPassManager::runOnModule(llvm::Module&) + 497
16 clang 0x0000000001d6ab4b llvm::PassManagerImpl::run(llvm::Module&)
+ 187
17 clang 0x00000000007abc05
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1525
18 clang 0x00000000007a8ec1
19 clang 0x00000000009031ff clang::ParseAST(clang::Sema&, bool) + 511
20 clang 0x00000000007a7a94 clang::CodeGenAction::ExecuteAction() +
68
21 clang 0x000000000064e281
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 321
22 clang 0x000000000063720a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1418
23 clang 0x000000000062d2e0 cc1_main(char const**, char const**, char
const*, void*) + 960
24 clang 0x0000000000635fc7 main + 7207
25 libc.so.6 0x00007ffff6ea9c4d __libc_start_main + 253
26 clang 0x000000000062abf9
Stack dump:
0. Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r149185-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.20.1
-momit-leaf-frame-pointer -coverage-file small.o -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r149185-install/bin/../lib/clang/3.1
-fmodule-cache-path /var/tmp/clang-module-cache -I
/opt/intel/composer_xe_2011_sp1.7.256/mkl/include -I
/opt/intel/composer_xe_2011_sp1.7.256/tbb/include -internal-isystem
/usr/local/include -internal-isystem
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r149185-install/bin/../lib/clang/3.1/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-w -fdebug-compilation-dir /home/regehr/tmp -ferror-limit 19 -fmessage-length
83 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o small.o -x
c small.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'small.c'.
4. Running pass 'Loop Pass Manager' on function '@func_21'
5. Running pass 'Induction Variable Simplification' on basic block
'%lbl_818'
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.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/small-g3aany.i
clang: note: diagnostic msg: /tmp/small-g3aany.sh
[regehr at gamow tmp]$ cat small.c
static int g_244[][0];
int g_814;
void func_27 ( );
int func_21_l_773;
void
func_21 ( void )
{
int p_23 = 0;
int p_22 = 0;
lbl_818:
func_27 ( );
int *l_787 = &func_21_l_773;
for ( g_814 = 0; g_814 <= 0; g_814 = 1 )
*l_787 = g_244[0][g_814];
if ( func_21_l_773 )
goto lbl_818;
return;
}
--
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