Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JSC] Use SlowPathFrameTracer and fix most of wasm GC operations #8561

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Jan 12, 2023

31ae64f

[JSC] Use SlowPathFrameTracer and fix most of wasm GC operations
https://bugs.webkit.org/show_bug.cgi?id=250502
rdar://104156324

Reviewed by Mark Lam.

Use SlowPathFrameTracer to configure topCallFrame in Wasm LLInt SlowPathes.
And remove storeTopCallFrame since it is no longer used: it was originally
introduced to make VM separate from Wasm::Instance etc. while keeping the
functionality of setting a CallFrame* to VM. But now we wiped this abstraction,
so this SlowPathFrameTracer change cleans up things.

We also fix bugs of wasm GC operations where they do not set topCallFrame correctly.
They need to set it since they do GC allocation, which can cause ShadowChicken processing,
and it requires topCallFrame. This patch fixes them.

* Source/JavaScriptCore/wasm/WasmInstance.h:
(JSC::Wasm::Instance::storeTopCallFrame): Deleted.
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::WASM_SLOW_PATH_DECL):
(JSC::LLInt::slow_path_wasm_throw_exception):

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

cafc4e5

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ›  gtk   πŸ›  wincairo
βœ… πŸ§ͺ webkitperl ⏳ πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ gtk-wk2
⏳ πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1   πŸ§ͺ api-gtk
❌ πŸ›  πŸ§ͺ jsc βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2 βœ… πŸ›  jsc-armv7
βœ… πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress   πŸ›  jsc-mips
βœ… πŸ›  watch-sim   πŸ§ͺ jsc-mips-tests
βœ… πŸ›  πŸ§ͺ unsafe-merge

@Constellation Constellation requested a review from a team as a code owner January 12, 2023 07:09
@Constellation Constellation self-assigned this Jan 12, 2023
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Jan 12, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 12, 2023
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Jan 12, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 12, 2023
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Jan 12, 2023
@Constellation Constellation changed the title [JSC] Use SlowPathFrameTracer [JSC] Use SlowPathFrameTracer and fix most of wasm GC operations Jan 12, 2023
Copy link

@MenloDorian MenloDorian 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

@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 12, 2023
https://bugs.webkit.org/show_bug.cgi?id=250502
rdar://104156324

Reviewed by Mark Lam.

Use SlowPathFrameTracer to configure topCallFrame in Wasm LLInt SlowPathes.
And remove storeTopCallFrame since it is no longer used: it was originally
introduced to make VM separate from Wasm::Instance etc. while keeping the
functionality of setting a CallFrame* to VM. But now we wiped this abstraction,
so this SlowPathFrameTracer change cleans up things.

We also fix bugs of wasm GC operations where they do not set topCallFrame correctly.
They need to set it since they do GC allocation, which can cause ShadowChicken processing,
and it requires topCallFrame. This patch fixes them.

* Source/JavaScriptCore/wasm/WasmInstance.h:
(JSC::Wasm::Instance::storeTopCallFrame): Deleted.
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::WASM_SLOW_PATH_DECL):
(JSC::LLInt::slow_path_wasm_throw_exception):

Canonical link: https://commits.webkit.org/258824@main
@webkit-commit-queue
Copy link
Collaborator

Committed 258824@main (31ae64f): https://commits.webkit.org/258824@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit 31ae64f into WebKit:main Jan 12, 2023
@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 Jan 12, 2023
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
5 participants