forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allocator: Add Windows _aligned_* shims
On Windows we don’t currently hook the _aligned_* allocation APIs, this can cause issues because _aligned_realloc can call HeapSize and cause GWP-ASan crashes similar to bug 909720. Unfortunately the _aligned_realloc API is different enough that it can not be implemented using the standard POSIX shims, in particular because _aligned_malloc and _aligned_free don't return valid allocation addresses, they are offsets into allocations. I add new Windows platform-specific shims for _aligned_malloc, _aligned_realloc, and _aligned_free and wire them in for all users of the allocator shims. I implement these routines on top of the Windows Heap* API and leave uncommon _aligned_* shims to crash to ensure that any future uses immediately surface why their use fails. Bug: 912500, 896019 Change-Id: Ieaa50b816ab277a6ad4b80ee8519027343fa9878 Reviewed-on: https://chromium-review.googlesource.com/c/1367485 Reviewed-by: danakj <[email protected]> Reviewed-by: Vitaly Buka <[email protected]> Reviewed-by: Alexei Filippov <[email protected]> Reviewed-by: Erik Chen <[email protected]> Reviewed-by: Will Harris <[email protected]> Reviewed-by: Sigurður Ásgeirsson <[email protected]> Commit-Queue: Vlad Tsyrklevich <[email protected]> Cr-Commit-Position: refs/heads/master@{#616106}
- Loading branch information
Showing
18 changed files
with
634 additions
and
2 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
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
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
Oops, something went wrong.