[LLVMbugs] [Bug 11361] New: clang segfault
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Nov 11 18:08:24 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11361
Bug #: 11361
Summary: clang segfault
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
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 due to use of freed heap.
[regehr at gamow tmp061]$ clang -v
clang version 3.1 (trunk 144423)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp061]$ clang -O2 -c -w small.c
0 clang 0x0000000001d08aff
1 clang 0x0000000001d0ad72
2 libpthread.so.0 0x00007ffff7bcf8f0
3 clang 0x0000000001b5ca8e
llvm::ScalarEvolution::ComputeExitCountExhaustively(llvm::Loop const*,
llvm::Value*, bool) + 2366
4 clang 0x0000000001b60a4e
llvm::ScalarEvolution::ComputeExitLimitFromICmp(llvm::Loop const*,
llvm::ICmpInst*, llvm::BasicBlock*, llvm::BasicBlock*) + 670
5 clang 0x0000000001b60ff4
llvm::ScalarEvolution::ComputeExitLimitFromCond(llvm::Loop const*,
llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*) + 468
6 clang 0x0000000001b61547
llvm::ScalarEvolution::ComputeExitLimit(llvm::Loop const*, llvm::BasicBlock*) +
711
7 clang 0x0000000001b618c6
llvm::ScalarEvolution::ComputeBackedgeTakenCount(llvm::Loop const*) + 790
8 clang 0x0000000001b61ec6
llvm::ScalarEvolution::getBackedgeTakenInfo(llvm::Loop const*) + 806
9 clang 0x0000000001b74179
llvm::ScalarEvolution::getBackedgeTakenCount(llvm::Loop const*) + 9
10 clang 0x0000000001961255
11 clang 0x0000000001b056b7
llvm::LPPassManager::runOnFunction(llvm::Function&) + 1287
12 clang 0x0000000001c5d66b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 587
13 clang 0x0000000001a9920d
14 clang 0x0000000001c5d167
llvm::MPPassManager::runOnModule(llvm::Module&) + 503
15 clang 0x0000000001c5d2fb llvm::PassManagerImpl::run(llvm::Module&)
+ 187
16 clang 0x0000000000831821
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1505
17 clang 0x000000000082eff1
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 353
18 clang 0x000000000097bdaf clang::ParseAST(clang::Sema&, bool) + 431
19 clang 0x000000000082dbd4 clang::CodeGenAction::ExecuteAction() +
68
20 clang 0x00000000006ee7f5
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 373
21 clang 0x00000000006d0e89
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1401
22 clang 0x00000000006c7117 cc1_main(char const**, char const**, char
const*, void*) + 791
23 clang 0x00000000006cfc57 main + 7175
24 libc.so.6 0x00007ffff6ea9c4d __libc_start_main + 253
25 clang 0x00000000006c4d19
Stack dump:
0. Program arguments: /uusoc/exports/scratch/regehr/z/llvm-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mdisable-fp-elim -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/llvm-install/bin/../lib/clang/3.1
-fmodule-cache-path /var/tmp/clang-module-cache -I
/opt/intel/composerxe-2011.5.220/mkl/include -I
/opt/intel/composerxe-2011.5.220/tbb/include -internal-isystem
/usr/local/include -internal-isystem
/uusoc/exports/scratch/regehr/z/llvm-install/bin/../lib/clang/3.1/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-w -fdebug-compilation-dir /home/regehr/z/volatile/bugs/tmp061 -ferror-limit 19
-fmessage-length 80 -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_1'
5. Running pass 'Induction Variable Simplification' on basic block
'%for.cond8.preheader'
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) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/small-ENoJGw.i
clang: note: diagnostic msg: /tmp/small-ENoJGw.sh
[regehr at gamow tmp061]$ cat small.c
int
func_5 (char si1, int si2)
{
return si1 + 1;
}
int g_811;
int
func_1 ()
{
{
int i;
{
int l_1264;
for (i = 0; 0; i++);
{
char l_1330[6][10][1];
for (l_1264 = 0; l_1264 < 3; l_1264 = func_5 (l_1264, 0))
{
for (; 0; i++);
for (g_811 = 7; g_811; g_811 -= 1)
++l_1330[0][0][1];
}
}
}
}
return 0;
}
--
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