[LLVMbugs] [Bug 13021] New: Clang in an infinite loop
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 4 01:14:12 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13021
Bug #: 13021
Summary: Clang in an infinite loop
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: merkil at savhon.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
This testcase makes Clang as of r157903 go into what looks like an infinite
loop, which causes very high memory consumption.
$ cat file.c
unsigned char a, i;
void f1(void)
{
for(i = 0; i < 30; i++)
a *= a;
}
void f2(void)
{
f1();
}
$ ulimit -t 60
$ ~/clang/build/Release+Asserts/bin/clang -O3 -w file.c
0 clang 0x0000000001bb22af
1 clang 0x0000000001bb27c4
2 libpthread.so.0 0x00007f9488e04280
3 clang 0x00000000018ba2fb
4 clang 0x00000000018b9bf3
5 clang 0x00000000018b3d7b
6 clang 0x00000000018b305b
7 clang 0x0000000001b2036b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 443
8 clang 0x0000000001988225
9 clang 0x0000000001b20843
llvm::MPPassManager::runOnModule(llvm::Module&) + 419
10 clang 0x0000000001b20dc8 llvm::PassManagerImpl::run(llvm::Module&)
+ 408
11 clang 0x0000000001b20f2a llvm::PassManager::run(llvm::Module&) +
10
12 clang 0x0000000000786b20
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 4976
13 clang 0x00000000007849ea
14 clang 0x00000000008add35 clang::ParseAST(clang::Sema&, bool, bool)
+ 389
15 clang 0x0000000000783a78 clang::CodeGenAction::ExecuteAction() +
184
16 clang 0x000000000065270d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973
17 clang 0x000000000063b0ab
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3307
18 clang 0x000000000063038b cc1_main(char const**, char const**, char
const*, void*) + 731
19 clang 0x000000000063772a main + 3482
20 libc.so.6 0x00007f948805d4bd __libc_start_main + 253
21 clang 0x000000000062ffed
Stack dump:
0. Program arguments: /home/merkil/git/clang/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
file.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -momit-leaf-frame-pointer -resource-dir
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-w -fdebug-compilation-dir /home/merkil/garbage/creduce/creduce -ferror-limit
19 -fmessage-length 96 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/file-tIT535.o -x c file.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'file.c'.
4. Running pass 'Reassociate expressions' on function '@f2'
clang: error: unable to execute command: CPU time limit exceeded
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 version 3.2 (trunk 157903)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/file-hnsPlF.i
clang: note: diagnostic msg: /tmp/file-hnsPlF.sh
--
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