MIPS: change `MacroAssembler::storeUncanonicalized{Float32,Double} to return a `FaultingCodeOffset`.
Categories
(Core :: JavaScript: WebAssembly, enhancement, P5)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox131 | --- | fixed |
People
(Reporter: jseward, Assigned: the)
References
Details
Attachments
(5 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
54.06 KB,
patch
|
Details | Diff | Splinter Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
58.86 KB,
patch
|
Details | Diff | Splinter Review | |
|
7.78 KB,
patch
|
Details | Diff | Splinter Review |
Without this change, the build will fail, due to the assembler changes made by
bug 1846474 (D187462).
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Comment 2•2 years ago
|
||
I also just finish the patch today, may could be a reference for you about the SummarizeTrapInstruction part.
| Reporter | ||
Comment 3•2 years ago
|
||
(In reply to Zhao Jiazhong from comment #2)
Created attachment 9365788 [details] [diff] [review]
mips64_trapsite.diff
Thanks for the patch. Although it is needed for compilation, it will have
no effect until you enable Trapsite checking for MIPS at
https://searchfox.org/mozilla-central/source/js/src/wasm/WasmGenerator.cpp#1077
(in ModuleGenerator::finishCodeTier). When you enable that, and run the
jit-tests, you may get some incorrect Trapsites detected, and you will need to fix those.
| Assignee | ||
Comment 4•2 years ago
|
||
(In reply to Zhao Jiazhong from comment #2)
Created attachment 9365788 [details] [diff] [review]
mips64_trapsite.diffI also just finish the patch today, may could be a reference for you about the
SummarizeTrapInstructionpart.
Thanks for the patch! I only did the FaultingCodeOffset part because I'm not familiar with MIPS instruction encoding. The FaultingCodeOffset fix alone is enough to get Firefox 120.0 building on MIPS64 (I build packages for AOSC OS). Your SummarizeTrapInstruction implementation is extremely helpful for me.
(In reply to Julian Seward [:jseward] from comment #3)
Thanks for the patch. Although it is needed for compilation, it will have
no effect until you enable Trapsite checking for MIPS at
https://searchfox.org/mozilla-central/source/js/src/wasm/WasmGenerator.cpp#1077
(in ModuleGenerator::finishCodeTier).
I believe his patch already includes that.
When you enable that, and run the
jit-tests, you may get some incorrect Trapsites detected, and you will need to fix those.
I'll try to do that and maybe submit the SummarizeTrapInstruction part in a separate review.
| Reporter | ||
Comment 5•2 years ago
|
||
(In reply to Jiangjin Wang from comment #4)
Thanks for the patch! I only did the
FaultingCodeOffsetpart because I'm not familiar with MIPS instruction encoding. TheFaultingCodeOffsetfix alone is enough to get Firefox 120.0 building on MIPS64 (I build packages for AOSC OS). YourSummarizeTrapInstructionimplementation is extremely helpful for me.
I should explain .. the TrapSite checking machinery (in ModuleGenerator::finishCodeTier)
is needed to detect incorrect FaultingCodeOffsets that the assembler layers create.
In short, all FaultingCodeOffsets must point to an instruction that can actually
fault (SIGSEGV or SIGILL); if that happens, SpiderMonkey catches the signal and
continues. If these FaultingCodeOffsets are incorrect, these signals will not be
caught and so can cause a tab crash in Firefox.
The checking machinery uses SummariseTrapInstruction to look at each instruction
pointed to by a FaultingCodeOffset, to check that it really will trap. This has
found bugs in our macroassembler stack. So you need to enable it to have the
most reliable wasm support on MIPS.
Thanks for the patch. Although it is needed for compilation, it will have
no effect until you enable Trapsite checking for MIPS at
https://searchfox.org/mozilla-central/source/js/src/wasm/WasmGenerator.cpp#1077
(in ModuleGenerator::finishCodeTier).I believe his patch already includes that.
I don't see that in https://phabricator.services.mozilla.com/D194834; did you
mean some other patch?
| Assignee | ||
Comment 6•2 years ago
|
||
(In reply to Julian Seward [:jseward] from comment #5)
I don't see that in https://phabricator.services.mozilla.com/D194834; did you
mean some other patch?
Yea, I thought you were talking about the patch from Jiazhong's patch in the attachments. I submitted that review before Jiazhong finished his.
As a status update, I just got the review comments addressed and Firefox building with SummarizeTrapInstruction locally. I'm running jit-test now.
Updated•2 years ago
|
| Assignee | ||
Comment 7•2 years ago
|
||
Ref: https://bugzilla.mozilla.org/attachment.cgi?id=9365788&action=diff
Co-Authored-By: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Comment 8•2 years ago
|
||
Note the mips32 code is also affected.
Comment 9•2 years ago
|
||
There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:the, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Comment 12•1 year ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Comment 13•1 year ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:rhunt, since the bug has recent activity, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
| Reporter | ||
Comment 15•1 year ago
|
||
(In reply to Jiaxun Yang [:flygoat] from comment #14)
Any chance to get this landed?
Do the patches (D195052 and D194834) apply and build successfully on the current mozilla-central code?
Comment 16•1 year ago
|
||
(In reply to Julian Seward [:jseward] from comment #15)
(In reply to Jiaxun Yang [:flygoat] from comment #14)
Any chance to get this landed?
Do the patches (D195052 and D194834) apply and build successfully on the current mozilla-central code?
Yes they still applies with moz-phab and works.
| Reporter | ||
Comment 17•1 year ago
|
||
Ok. I will land it after the current soft code freeze ends, on 8 August.
Comment 18•1 year ago
|
||
They don't apply cleanly on current central. Bug 1905058 and bug 1835034 introduced conflicts in the first one and bug 1898153 in the second one.
| Reporter | ||
Comment 19•1 year ago
|
||
(In reply to Mike Hommey [:glandium] from comment #18)
They don't apply cleanly on current central.
One of the patches, D195052, doesn't even build; there is a syntax error
in the definition of macro INSN(..). I fixed it.
Updated•1 year ago
|
Comment 20•1 year ago
|
||
Comment 21•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b89fcb3c99c7
https://hg.mozilla.org/mozilla-central/rev/5a0b16abb1e7
| Reporter | ||
Comment 22•1 year ago
|
||
D194834 as rebased for esr128.
| Reporter | ||
Comment 23•1 year ago
|
||
D195052 as rebased for esr128.
Description
•