Fix sporadic test failures by avoiding excessive compiler memory consumption#5383
Merged
StephanTLavavej merged 1 commit intomicrosoft:mainfrom Apr 10, 2025
Merged
Conversation
This addresses all of the tests that were consuming 3+ GB for x86 /analyze:only: Test | Before | After | -------------------------------------|--------------:|--------------:| `P0896R4_ranges_alg_copy` | 3,036,147,712 | 657,166,336 | `P0896R4_ranges_alg_transform_unary` | 3,199,823,872 | 695,132,160 | `P2321R2_views_adjacent` | 3,887,595,520 | 1,020,297,216 | `P2321R2_views_adjacent_transform` | 3,404,570,624 | 940,150,784 | `P2441R2_views_join_with` | 3,391,266,816 | 892,010,496 |
davidmrdavid
approved these changes
Mar 31, 2025
Member
Author
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes internal VSO-2431296, where
P2321R2_views_adjacentis sporadically running out of memory for x86-native/analyze:onlyconfigurations. (Internal builds of the compiler have a bit more debug logic than retail builds, which is why we haven't seen these failures in our GitHub PR/CI system.)Related:
Our stressful ranges/views tests, combined with Static Analysis's increased compiler memory consumption, interact poorly with the ABSOLUTE ABOMINATION of x86-hosted toolsets in the year 2025.
I modified #3567's incantations to find all of the tests that were consuming 3+ GB for x86-native
/analyze:only, then added our usual workarounds, reducing the peak working set sizes (in bytes) to reasonable levels:P0896R4_ranges_alg_copyP0896R4_ranges_alg_transform_unaryP2321R2_views_adjacentP2321R2_views_adjacent_transformP2441R2_views_join_withAs usual, the workarounds are architecture-independent, since consuming tons of memory isn't great even for properly x64-hosted compilers.
I also checked the plain configurations (original recipe C1XX, not extra crispy
/analyze:only). There are only a few at 2+ GB for x86-native, and none over 3 GB, so while they're still concerning, they aren't risking OOM:P2374R4_views_cartesian_product_recommended_practicesP0896R4_ranges_alg_mismatchP2321R2_views_adjacentP2374R4_views_cartesian_product(Note that
/analyze:onlyis just a variant of/analyzethat skips codegen.)