Build failure in JIT on OpenBSD/riscv64 since bug 1982266
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox144 | --- | wontfix |
| firefox145 | --- | fixed |
| firefox146 | --- | fixed |
People
(Reporter: gaston, Assigned: gaston)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
I'm just the messenger as i don't have such hardware, but the build fails in the JIT engine since its been enabled by default in bug 1982266:
/local/pobj/firefox-143.0.3/firefox-143.0.3/js/src/jit/riscv64/Architecture-riscv64.cpp:89:4: error: "Unsupported platform" 89
| # error "Unsupported platform"
i suppose it might affect the other BSDs.
a simple fix (from jca, in cc) is inlined below, which i can push if deemed acceptable :
--- js/src/jit/riscv64/Architecture-riscv64.cpp.orig
+++ js/src/jit/riscv64/Architecture-riscv64.cpp
@@ -76,7 +76,7 @@ void FlushICache(void* code, size_t size) {
#if defined(JS_SIMULATOR)
js::jit::SimulatorProcess::FlushICache(code, size);
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__OpenBSD__)
# if defined(__GNUC__)
intptr_t end = reinterpret_cast<intptr_t>(code) + size;
__builtin___clear_cache(reinterpret_cast<char*>(code),
--- js/src/wasm/WasmSignalHandlers.cpp.orig
+++ js/src/wasm/WasmSignalHandlers.cpp
@@ -100,6 +100,12 @@ using namespace js::wasm;
# define RLR_sig(p) ((p)->sc_lr)
# define R31_sig(p) ((p)->sc_sp)
# endif
+# if defined(__riscv)
+# define RPC_sig(p) ((p)->sc_sepc)
+# define RRA_sig(p) ((p)->sc_ra)
+# define RFP_sig(p) ((p)->sc_s[0])
+# define R02_sig(p) ((p)->sc_sp)
+# endif
# if defined(__mips__)
# define EPC_sig(p) ((p)->sc_pc)
# define RFP_sig(p) ((p)->sc_regs[30])
given the full list of riscv64 bugs (https://bugzilla.mozilla.org/buglist.cgi?quicksearch=riscv64&list_id=17728043) we might disable the jit on OpenBSD/riscv64 until it's been more battle tested - or at least someone (tm) has run the full jit testsuite and compared the results with other platforms.
Comment 1•4 months ago
|
||
Set release status flags based on info from the regressing bug 1982266
:csmantle, since you are the author of the regressor, bug 1982266, could you take a look?
For more information, please visit BugBot documentation.
Comment 2•4 months ago
|
||
(In reply to Landry Breuil (:gaston) from comment #0)
given the full list of riscv64 bugs (https://bugzilla.mozilla.org/buglist.cgi?quicksearch=riscv64&list_id=17728043) we might disable the jit on OpenBSD/riscv64 until it's been more battle tested - or at least someone (tm) has run the full jit testsuite and compared the results with other platforms.
Agreed.
| Assignee | ||
Comment 3•4 months ago
|
||
Updated•4 months ago
|
Hi Landry,
I tried the patch that you mentioned in #comment 3 in my firefox-v143.0.3 sources and built the firefox.
It was built successfully but still i am facing the crashes when i am trying to launch the new tabs.
can you look into this issue?
Regards,
Saiteja.
Comment 5•4 months ago
|
||
(In reply to Saiteja from comment #4)
I tried the patch that you mentioned in #comment 3 in my firefox-v143.0.3 sources and built the firefox.
It was built successfully but still i am facing the crashes when i am trying to launch the new tabs.
Hi Saiteja, are you building for OpenBSD on RV64? If so, I think we can try to look at if it's also caused by the same (seemingly) graphics issues you encountered earlier.
(Replying since I'm on the CC list.)
Hi Rong Bao,
I built firefox for riscv64 on ubuntu-22.04, i observed the similar crash on ubuntu-22.04. so,i patched the #comment 3 in my firefox and built the firefox still observing the tabs getting crashed, not on OpenBSD.
Regards,
Saiteja
Comment 7•4 months ago
|
||
(In reply to Saiteja from comment #6)
I built firefox for riscv64 on ubuntu-22.04, i observed the similar crash on ubuntu-22.04. so,i patched the #comment 3 in my firefox and built the firefox still observing the tabs getting crashed, not on OpenBSD.
I'm afraid this patch is a noop for non-OpenBSD builds, so this is consistent with what you have observed.
Updated•4 months ago
|
Comment 9•4 months ago
|
||
| bugherder | ||
Comment 10•4 months ago
|
||
The patch landed in nightly and beta is affected.
:gaston, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox145towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 11•4 months ago
|
||
Comment on attachment 9520384 [details]
Bug 1994624: fix JIT build on OpenBSD/riscv64. r=#spidermonkey-reviewers
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: FTBFS on OpenBSD/riscv64
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Tier3
- String changes made/needed:
- Is Android affected?: No
Updated•4 months ago
|
Comment 12•4 months ago
|
||
| uplift | ||
Updated•4 months ago
|
Description
•