Repository navigation
Conversation
The one-shot estimate ignored that the entry itself (and the Metas entry, laid out as Entries.Count*32) can push the body across the next 0x80000 boundary, throwing 'Playgo Chunk hash file was not allocated enough space' for some multi-GB packages (OpenOrbis#26, maxton#88/maxton#64/maxton#56). Sweep test over 1-70 GB.
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 #26 (also reported as maxton#88, maxton#64, maxton#56).
BuildPkgpre-allocates the PlayGo chunk hash entry (4 bytes per 64 KiB of the final package) from a one-shot estimate. The estimate misses two things:Entries.Count * 32) can push the body over the next 0x80000 boundary;For some package sizes this throws
Playgo Chunk hash file was not allocated enough space.Fix: compute the size to a fixed point, mirroring the actual layout. The exact size is still set later, as before.
Test:
ChunkShaTests.ChunkShaAllocation_HoldsForAnyPfsSizesweeps ~28k PFS sizes from 1 to 70 GB throughBuildPkgwithout writing anything. Master fails for several sizes; it passes with the fix. MarkedSlow(~75 s).