cppcoro icon indicating copy to clipboard operation
cppcoro copied to clipboard

async_generator_tests.cpp eating up all my memory

Open Rakete1111 opened this issue 5 years ago • 2 comments

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

Rakete1111 avatar Apr 12 '19 21:04 Rakete1111

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).

lewissbaker avatar Apr 15 '19 17:04 lewissbaker

I believe this issue will be fixed by this LLVM patch: https://reviews.llvm.org/D71826

modocache avatar Dec 27 '19 19:12 modocache