Skip to content

Conversation

mcollina
Copy link
Member

@mcollina mcollina commented Feb 9, 2021

Original commit message:

[mac][wasm] Work around MacOS 11.2 code page decommit failures

MacOS 11.2 refuses to set "no access" permissions on memory that
we previously used for JIT-compiled code. It is still unclear
whether this is WAI on the part of the kernel. In the meantime,
as a workaround, we use madvise(..., MADV_FREE_REUSABLE) instead
of mprotect(..., NONE) when discarding code pages. This is inspired
by what Chromium's gin platform does.

Fixed: v8:11389
Change-Id: I866586932573b4253002436ae5eee4e0411c45fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2679688
Commit-Queue: Jakob Kummerow <[email protected]>
Commit-Queue: Michael Lippautz <[email protected]>
Auto-Submit: Jakob Kummerow <[email protected]>
Reviewed-by: Michael Lippautz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#72559}

Refs: v8/v8@0c8b6e4

Original commit message:

    [mac][wasm] Work around MacOS 11.2 code page decommit failures

    MacOS 11.2 refuses to set "no access" permissions on memory that
    we previously used for JIT-compiled code. It is still unclear
    whether this is WAI on the part of the kernel. In the meantime,
    as a workaround, we use madvise(..., MADV_FREE_REUSABLE) instead
    of mprotect(..., NONE) when discarding code pages. This is inspired
    by what Chromium's gin platform does.

    Fixed: v8:11389
    Change-Id: I866586932573b4253002436ae5eee4e0411c45fc
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2679688
    Commit-Queue: Jakob Kummerow <[email protected]>
    Commit-Queue: Michael Lippautz <[email protected]>
    Auto-Submit: Jakob Kummerow <[email protected]>
    Reviewed-by: Michael Lippautz <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#72559}

Refs: v8/v8@0c8b6e4
@mcollina mcollina requested a review from targos February 9, 2021 18:25
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. v8 engine Issues and PRs related to the V8 dependency. labels Feb 9, 2021
@mcollina
Copy link
Member Author

mcollina commented Feb 9, 2021

This fixes #37061.

cc @AshCripps @mhdawson

@AshCripps
Copy link
Member

Dupe of #37276?

@mcollina mcollina closed this Feb 9, 2021
@targos targos added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Feb 11, 2021
@targos targos removed their request for review February 11, 2021 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. duplicate Issues and PRs that are duplicates of other issues or PRs. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants