Skip to content

Linux: Detect JIT support#40071

Merged
jdm merged 1 commit intoservo:mainfrom
jschwe:detect_jit_support
Oct 22, 2025
Merged

Linux: Detect JIT support#40071
jdm merged 1 commit intoservo:mainfrom
jschwe:detect_jit_support

Conversation

@jschwe
Copy link
Copy Markdown
Member

@jschwe jschwe commented Oct 22, 2025

On some systems (specifically ohos / HarmonyOS) JIT may be forbidden, which would cause spidermonkey to crash.
To avoid this, we test if JIT would work on startup, by remapping a page to be executable and disabling JIT if it not allowed.
The runtime check is currently only implemented for linux, but similar checks could easily be added for other platforms which also may have similar restrictions.

Testing: TBD
Fixes: #40029

On some systems (specifically ohos) JIT may be forbidden, which
would cause spidermonkey to crash.
To avoid this, we test if JIT would work on startup, by remapping
a page to be executable and handling the potential error.

Signed-off-by: Jonathan Schwender <[email protected]>
@jschwe jschwe marked this pull request as ready for review October 22, 2025 13:25
@jschwe jschwe requested a review from gterzian as a code owner October 22, 2025 13:25
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 22, 2025
Copy link
Copy Markdown
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice solution!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 22, 2025
@jdm jdm added this pull request to the merge queue Oct 22, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 22, 2025
Merged via the queue into servo:main with commit 9e8744e Oct 22, 2025
35 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 22, 2025
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.

HarmonyOS5: servo hap exited immediately running on Matebook Pro

3 participants