Bug 258409 - Skip JIT memory allocation in ExecutableAllocator::disableJIT() when running on an open source XNU.
Summary: Skip JIT memory allocation in ExecutableAllocator::disableJIT() when running ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on: 258435
Blocks:
  Show dependency treegraph
 
Reported: 2023-06-22 11:09 PDT by Mark Lam
Modified: 2023-06-22 21:58 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2023-06-22 11:09:31 PDT
The open source XNU does not support special handling of JIT memory.  However, macOS Safari and WebKit binaries still need to be able to run on the open source XNU, albeit without JIT.

However, ExecutableAllocator::disableJIT() is still trying to allocated JIT memory if the JIT entitlement is present (which is defined by the WebKit binary, not the kernel), and currently, will assert that the allocation succeeds.  We need to skip this allocation and assertion when running on open source XNU because the allocation is not necessary, and the assertion is invalid for the open source kernel and will fail every time.
Comment 1 Mark Lam 2023-06-22 11:09:42 PDT
rdar://111170164
Comment 2 Mark Lam 2023-06-22 11:29:48 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15204
Comment 3 EWS 2023-06-22 17:49:28 PDT
Committed 265435@main (6063bc484b4f): <https://commits.webkit.org/265435@main>

Reviewed commits have been landed. Closing PR #15204 and removing active labels.
Comment 4 WebKit Commit Bot 2023-06-22 21:21:08 PDT
Re-opened since this is blocked by bug 258435
Comment 5 Mark Lam 2023-06-22 21:52:30 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15226
Comment 6 EWS 2023-06-22 21:58:46 PDT
Committed 265446@main (ee19c59a58e7): <https://commits.webkit.org/265446@main>

Reviewed commits have been landed. Closing PR #15226 and removing active labels.