-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
map: replace hacky unsafe.Pointer conversion with PROT_NONE page
One of our legacy code paths currently does a dodgy pointer conversion: unsafe.Pointer(^uintptr(0)) This is (correctly) flagged by linters as being a bit bogus, since unsafe.Pointer conversions do have an effect on the GC (I believe). It also assumes that the highest address is never used. Map an inaccessible page and use that instead of the bogus pointer. This has the same effect but is much safer. Signed-off-by: Lorenz Bauer <[email protected]>
- Loading branch information
Showing
3 changed files
with
19 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