-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid reading many-object span sampled state in assertions.
Spans with multiple objects are mutated by the CentralFreeList as objects are allocate/deallocated from the span. The Span contains a bitfield that shares its byte with nonempty_index_ (mutated by CentralFreeList) and sampled_, leading to a data race. This assertion is superfluous, as we assert that the PageMap has a non-zero size class for the object consistent with the one provided. We also confirm that sampled span do not have non-zero size classes upon allocation/deallocation. We add a stress test as well, for GetAllocatedSize, since this exercises a path that checks sampled(), but only on large allocations. PiperOrigin-RevId: 573323553 Change-Id: I0ab4ae1ff63130318113d397495f685aa0ec12dc
- Loading branch information
1 parent
bf12669
commit 2811c61
Showing
4 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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