Skip to content

Disable libpas JIT heap on Windows ARM64#234

Merged
sosukesuzuki merged 1 commit into
mainfrom
disable-libpas-jit-heap-windows-arm64
May 20, 2026
Merged

Disable libpas JIT heap on Windows ARM64#234
sosukesuzuki merged 1 commit into
mainfrom
disable-libpas-jit-heap-windows-arm64

Conversation

@sosukesuzuki

Copy link
Copy Markdown

Upstream af63dbd0b5d ([libpas] Enable JIT-heap on Windows) flipped ENABLE_LIBPAS_JIT_HEAP on for Windows. Since picking that up via #231, Windows ARM64 CI has been intermittently crashing with illegal instruction on DFG worker threads.

The crash is a PAS_ASSERT firing inside jit_heap_try_allocate -> pas_segregated_heap_ensure_allocator_index. On Windows ARM64, libpas's __builtin_trap() compiles to brk #1, which the OS reports as STATUS_ILLEGAL_INSTRUCTION rather than a breakpoint, so the assertion failure surfaces as a flaky illegal-instruction panic.

Windows x64 has not exhibited this failure across the same range of CI builds, so this keeps the libpas JIT heap enabled there and falls back to the legacy MetaAllocator path on Windows ARM64 only, until the assertion is root-caused.

The rest of af63dbd0b5d (the pas_mmap_capability -> pas_page_flags refactor and the executable-protection plumbing in pas_page_malloc) is left intact; with ENABLE_LIBPAS_JIT_HEAP off on ARM64, jit_heap_config is unused there and pas_page_flag_executable is never set, so those code paths are inert.

af63dbd enabled the libpas JIT heap on Windows, but on Windows ARM64
DFG worker threads intermittently hit a PAS_ASSERT inside
jit_heap_try_allocate -> pas_segregated_heap_ensure_allocator_index.
On ARM64 Windows, libpas's __builtin_trap() compiles to brk #1, which the
OS reports as STATUS_ILLEGAL_INSTRUCTION rather than a breakpoint, so the
crash surfaces as a flaky 'illegal instruction' failure.

Windows x64 has not exhibited the same failure, so leave the libpas JIT
heap enabled there and fall back to the legacy MetaAllocator path on
Windows ARM64 only until the assertion is root-caused.
@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3b14c378-93e5-4535-a9ac-02cf863d161b

📥 Commits

Reviewing files that changed from the base of the PR and between 3167a44 and c8f7dc7.

📒 Files selected for processing (1)
  • Source/JavaScriptCore/jit/ExecutableMemoryHandle.h

Walkthrough

This PR updates the platform-specific preprocessor guard in ExecutableMemoryHandle.h that controls which JIT memory allocation implementation is compiled on Windows ARM64. The change modifies the #if condition and includes a FIXME comment documenting the prior assertion failure that necessitates the platform-specific handling.

Changes

ExecutableMemoryHandle Platform Guard

Layer / File(s) Summary
Windows ARM64 libpas heap guard update
Source/JavaScriptCore/jit/ExecutableMemoryHandle.h
Preprocessor guard for libpas JIT heap is updated with explicit platform conditions and a FIXME comment explaining the assertion failure context on Windows ARM64.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides detailed context about the upstream change, the crash symptoms, root cause analysis, and the rationale for the selective disabling, but does not follow the WebKit PR template format (missing bug reference, Bugzilla link, and structured section organization). Add a Bugzilla bug reference/link at the top, include 'Reviewed by' line, and restructure to match the WebKit template format with clear sections for the bug reference and explanation.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: disabling the libpas JIT heap specifically on Windows ARM64.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Preview Builds

Commit Release Date
c8f7dc7f autobuild-preview-pr-234-c8f7dc7f 2026-05-20 14:59:18 UTC

@sosukesuzuki sosukesuzuki merged commit 01ecc4e into main May 20, 2026
73 of 85 checks passed
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.

1 participant