cppcoro
cppcoro copied to clipboard
async_generator_tests.cpp eating up all my memory
async_generator_tests.cpp is eating up all my memory. It eats through 16GB of RAM and 8GB of swap before it crashes with an out of memory exception. I'm on the latest LLVM trunk.
I looked at the file I can't seem to figure out why it takes that long to compile, and the memory usage is very suspicious. Does anyone else have this issue? Is this a clang bug? On which clang versions does compiling the test work?
The command being executed:
/usr/local/bin/clang -c -MD -x c++ -std=c++1z -fcoroutines-ts -m64 -stdlib=libc++ -O3 -g -flto -D CPPCORO_RELEASE_OPTIMISED -I ./include test/async_generator_tests.cpp -o build/linux_x64_clang9.0.0_optimised/test/obj/async_generator_tests.o -MF /tmp/CakeGccDepbTmQQu
Thanks for the report.
I have noticed that some of the CI clang optimised builds have been failing with a timeout but I haven't had time to investigate yet. eg. https://travis-ci.org/lewissbaker/cppcoro/jobs/516440413
I expect it's a clang bug. The test compiles under debug builds (-O0
).
I believe this issue will be fixed by this LLVM patch: https://reviews.llvm.org/D71826