-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<algorithm>: /analyze with ranges algorithms emits fatal error C1060: compiler is out of heap space #1030
Comments
I've seen this with VS2015. |
This is a temporary workaround for #1030 to unblock ranges PRs.
Workaround VSO-938163 in triggered in `P0896R4_ranges_alg_move` as well. Remove `/analyze` "help" from ranges tests. Re-enable `/analyze:only` coverage in `concepts_matrix.lst`. Apply improved workaround for microsoftGH-1030: don't test `constexpr` under `/analyze`. Add missing return type check in `P0896R4_ranges_alg_move`.
That might have a different root cause (as these tests are single-TU). If it still repros with VS 2019, it's probably worth reporting. Configuring our CI system to use x64-hosted x86-targeting binaries might be a mitigation, but it would be invasive. Reporting the ranges/concepts interaction to the analyze team, and using a targeted workaround, is probably less disruptive. |
Yeah changing the CI so that we could use the x64/x86 cross-compiler for tests other than tests with the |
…he internal compiler
This is the last test for which I've heard complaints about memory usage.
We've been encountering a recurring problem where testing the ranges algorithms with
/analyze
will fail withfatal error C1060: compiler is out of heap space
. Specifically, the trigger seems to beconstexpr
testing of ranges algorithms with/analyze
. TakeP0896R4_ranges_alg_move
for example:test_in_write<instantiator, int_wrapper, int_wrapper>()
callsinstantiator::call
with 825 different combinations of template arguments to get test coverage of virtually every possible combination of range argument properties. Compiling this test with/analyze
exhausts the compiler heap resulting in C1060. It compiles fine if we comment out the// ***CONSTEXPR TEST***
line, but produces the same error if we comment out only the next non-constexpr
test line. There's no clear reason why virtually the same code should require vastly more memory to analyze when it happens to be called in a constant expression vs. not. Indeed it's not clear to me why that distinction would affect the static analyzer at all.We'll work around this for the time being by conditionally compiling the
constexpr
test only when_PREFAST_
is not defined, which indicates that/analyze
is not enabled. @CaseyCarter will try to reduce a simpler test case and submit a static analyzer bug on Developer Community.The text was updated successfully, but these errors were encountered: