Skip to content

std: Allocate tlscsprng memory as needed#8795

Merged
andrewrk merged 1 commit intoziglang:masterfrom
LemonBoy:fix-7609
May 17, 2021
Merged

std: Allocate tlscsprng memory as needed#8795
andrewrk merged 1 commit intoziglang:masterfrom
LemonBoy:fix-7609

Conversation

@LemonBoy
Copy link
Contributor

Let mmap allocate a block of memory that's wide enough to use with
MADV_WIPEONFORK, madvise granularity is the current system page size
(using a static buffer of mem.page_size bytes would be wrong, that's the
minimum page size).

As a result, we don't zero some random chunk of memory every time we
fork the process.

Fixes #7609

Let mmap allocate a block of memory that's wide enough to use with
MADV_WIPEONFORK, madvise granularity is the current system page size
(using a static buffer of mem.page_size bytes would be wrong, that's the
minimum page size).

As a result, we don't zero some random chunk of memory every time we
fork the process.

Fixes ziglang#7609
@andrewrk andrewrk merged commit b7eab32 into ziglang:master May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid use of madvise

3 participants