Bug 258409

Summary: Skip JIT memory allocation in ExecutableAllocator::disableJIT() when running on an open source XNU.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 258435    
Bug Blocks:    

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.