Skip to content

Conversation

@Constellation
Copy link
Member

@Constellation Constellation commented Jun 16, 2025

1f3b9d9

[JSC] IPInt exception handlers should be tagged correctly
https://bugs.webkit.org/show_bug.cgi?id=294580
rdar://149335739

Reviewed by Keith Miller.

When JITCage is enabled, they must be JIT code. So,

1. When JIT is enabled, we just wrap these handlers with JIT code as the
   same way to the other trampolines as well.
2. When JIT is not enabled, then we just grab a code pointer to these
   ops.

* Source/JavaScriptCore/assembler/JITOperationList.cpp:
(JSC::llintOperations):
* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/llint/InPlaceInterpreter.h:
* Source/JavaScriptCore/llint/LLIntThunks.cpp:
(JSC::LLInt::inPlaceInterpreterEntryThunk): Deleted.
(JSC::LLInt::inPlaceInterpreterSIMDEntryThunk): Deleted.
* Source/JavaScriptCore/llint/LLIntThunks.h:
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::IPIntCallee::IPIntCallee):

Canonical link: https://commits.webkit.org/296295@main

3463cc0

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@Constellation Constellation requested a review from a team as a code owner June 16, 2025 21:45
@Constellation Constellation self-assigned this Jun 16, 2025
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Jun 16, 2025
Copy link
Contributor

@kmiller68 kmiller68 left a comment

Choose a reason for hiding this comment

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

r=me.


global _ipint_catch_entry
_ipint_catch_entry:
op(ipint_catch_entry, macro()
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this duplicate the code three times? Can we file a bug to make a macro entrypoint and use that instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 16, 2025
https://bugs.webkit.org/show_bug.cgi?id=294580
rdar://149335739

Reviewed by Keith Miller.

When JITCage is enabled, they must be JIT code. So,

1. When JIT is enabled, we just wrap these handlers with JIT code as the
   same way to the other trampolines as well.
2. When JIT is not enabled, then we just grab a code pointer to these
   ops.

* Source/JavaScriptCore/assembler/JITOperationList.cpp:
(JSC::llintOperations):
* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/llint/InPlaceInterpreter.h:
* Source/JavaScriptCore/llint/LLIntThunks.cpp:
(JSC::LLInt::inPlaceInterpreterEntryThunk): Deleted.
(JSC::LLInt::inPlaceInterpreterSIMDEntryThunk): Deleted.
* Source/JavaScriptCore/llint/LLIntThunks.h:
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::IPIntCallee::IPIntCallee):

Canonical link: https://commits.webkit.org/296295@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/JSC-IPInt-exception-handlers-should-be-tagged-correctly branch from 3463cc0 to 1f3b9d9 Compare June 16, 2025 23:49
@webkit-commit-queue
Copy link
Collaborator

Committed 296295@main (1f3b9d9): https://commits.webkit.org/296295@main

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

@webkit-commit-queue webkit-commit-queue merged commit 1f3b9d9 into WebKit:main Jun 16, 2025
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 16, 2025
@Constellation Constellation deleted the eng/JSC-IPInt-exception-handlers-should-be-tagged-correctly branch June 16, 2025 23:52
@rkirsling
Copy link
Member

Looks like this caused a whole slew of undefined symbols on PlayStation (while EWS was downed by #46760):
https://build.webkit.org/#/builders/65/builds/53201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants