Fix assertion when capturing dump on ARM64 #112550
Merged
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.
This change fixes an assertion fired on OSX/ARM64 while capturing a heap dump.
The problem is that on OSX/ARM64, the page size is 16k (instead of the usual 4k), so
SpecialDiagInfoSize
is not a multiple of the page size, theend
will not be page aligned.And by the time this special region get to
CombineMemoryRegions
, it won't usually get combined with any existing region, but it itself is not page aligned, and so triggering the assertion.We aren't really writing the actual page to the dump anyway, might as well just assert the exact size for this particular region instead.
This change is only tested for OSX/ARM64, and it should have no retail impact (just failing for check/debug builds)