Bug 256331
Summary: | Shuffle clobbers indirect call target in BBQ JIT | ||
---|---|---|---|
Product: | WebKit | Reporter: | David Degazio <d_degazio> |
Component: | WebAssembly | Assignee: | David Degazio <d_degazio> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
David Degazio
rdar://108908936
https://bugs.webkit.org/show_bug.cgi?id=256235 removed some redundant loads and stores from the call code generation in BBQ JIT. As part of this, we now use a parallel move/shuffle to move the arguments into their intended locations per the calling convention. Shuffling can require an extra scratch register, and we currently use wasmScratchGPR.
However, the implementation of indirect calls specifically depends on the target address being kept live in wasmScratchGPR across the parameter passing. If the shuffle touches wasmScratchGPR, it will clobber this address, and likely cause a crash. We should just use a different register for shuffles in indirect calls.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
David Degazio
Pull request: https://github.com/WebKit/WebKit/pull/13455
EWS
Committed 263697@main (c0664686f49d): <https://commits.webkit.org/263697@main>
Reviewed commits have been landed. Closing PR #13455 and removing active labels.