[LLVMbugs] [Bug 17520] New: clang++ crashes when compiling c++ code, after eating all available memory (with -O2 activated).
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Oct 9 01:20:49 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17520
Bug ID: 17520
Summary: clang++ crashes when compiling c++ code, after eating
all available memory (with -O2 activated).
Product: clang
Version: 3.2
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: David.Tschumperle at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
When trying to compile a minimal version of my project with clang++ (with
option -O2 specified), it eats all the available RAM (4Gb RAM + 4Gb Swap) to
compile a single .cpp file. Without '-O2', the compilation succeeds (in
seconds).
My project is using a lot of template functions, and I suspect this can be
related to this issue (I had similar issues with previous versions of g++ in
the past, that has been fixed, so g++ compiles it flawlessly now).
I attach a .zip file containing the sources to reproduce the problem, as well
as the two output files generated by clang++ (in subfolder 'clang-generated/').
This is what I get when typing 'make' on my machine (ASUS Zenbook 64bits, 4Gb
RAM, running Ubuntu 13.04) :
> dtschump at xxxxx:/tmp/gmic_clang$ make
> clang++ -o gmic gmic.cpp -O2 -Dgmic_build -Dcimg_display=0 -Dgmic_float_only -Dgmic_main -lpthread
> clang: error: unable to execute command: Killed
> clang: error: clang frontend command failed due to signal (use -v to see invocation)
> Ubuntu clang version 3.2-1~exp9ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
> clang: note: diagnostic msg:
> ********************
> PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> Preprocessed source(s) and associated run script(s) are located at:
> clang: note: diagnostic msg: /tmp/gmic-XLlwLm.cpp
> clang: note: diagnostic msg: /tmp/gmic-XLlwLm.sh
> clang: note: diagnostic msg:
> ********************
> make: *** [all] Error 254
The memory usage increases drastically after one minute, until reaching more
than 8Gb. Then it crashes.
This is my first bug report to clang++, I hope all necessary files are here.
Just let me know if you need more information.
Thanks.
--
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/20131009/249611da/attachment.html>
More information about the llvm-bugs
mailing list