-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CI for main
is broken
#4487
Comments
I've had a quick look, and the filetest failures are due to a newly added test (udiv_i16_const). However, this test passes natively for me. Not sure if this is a qemu issues ... I'll have a look. As to the
Not sure what exactly this means, but I can reproduce natively. |
Ok in that case I think I'm realizing that the ISLE transition for s390x may have fixed the |
Ok the When the other s390x issue is sorted I think we can backport temporary disabling of s390x running the test on the |
Initial reduction of the other issue from one failing wasm test case is:
which yields:
|
Reduced a bit further:
|
Right, from what I can see it seems the problem is related to the fact that Not sure what this has to do with s390x, though. |
Ah, that makes sense. As part of #4427 I fixed the following bug found by fuzzing:
This is exactly the problem here (when using the full-word divide instruction to perform a sub-word operation, the inputs must be properly extended or we get wrong results). The attached minimal backport of just this fix resolves the problem on the release-0.39.0 branch: |
@cfallin has found the issue and this fixes the panic: diff --git a/cranelift/codegen/src/machinst/vcode.rs b/cranelift/codegen/src/machinst/vcode.rs
index f9ef6670f..79959dfa3 100644
--- a/cranelift/codegen/src/machinst/vcode.rs
+++ b/cranelift/codegen/src/machinst/vcode.rs
@@ -606,6 +606,8 @@ impl<I: VCodeInst> VCodeBuilder<I> {
for reg in self.vcode.reftyped_vregs.iter_mut() {
*reg = Self::resolve_vreg_alias_impl(&self.vcode.vreg_aliases, *reg);
}
+ self.vcode.reftyped_vregs.sort();
+ self.vcode.reftyped_vregs.dedup();
self.compute_preds_from_succs();
self.vcode.debug_value_labels.sort_unstable(); |
As to the regalloc2 assertion, I see the following code just before the failure:
which looks very similar to the code I get on x86_64:
The only difference I can see is that on s390x, we have two vregs that are aliased (v129, v130), while on x86_64 we only have one (v129). This is pretty sure because s390x now lowers calls via ISLE, where we get the extra aliased copy. But that shouldn't change the behavior of regalloc2 otherwise. @cfallin maybe you can help here? |
Ah, nevermind ... already fixed. |
Thanks! For the release branches, maybe you can also add the patch from #4487 (comment) to fix the s390x filetest regression as well. |
This carries over a narrow fix from bytecodealliance#4427 to prior release branches. The patch here was created by `@uweigand` during the investigation for bytecodealliance#4487.
This carries over a narrow fix from bytecodealliance#4427 to prior release branches. The patch here was created by `@uweigand` during the investigation for bytecodealliance#4487.
* Fix panics in s390x codegen related to aliases This commit fixes an issue introduced as part of the fix for GHSA-5fhj-g3p3-pq9g. The `reftyped_vregs` list given to `regalloc2` is not allowed to have duplicates in it and while the list originally doesn't have duplicates once aliases are applied the list may have duplicates. The fix here is to perform another pass to remove duplicates after the aliases have been processed. * Fix a miscompile for s390x with constants This carries over a narrow fix from #4427 to prior release branches. The patch here was created by `@uweigand` during the investigation for #4487. * Add release notes
* Fix panics in s390x codegen related to aliases This commit fixes an issue introduced as part of the fix for GHSA-5fhj-g3p3-pq9g. The `reftyped_vregs` list given to `regalloc2` is not allowed to have duplicates in it and while the list originally doesn't have duplicates once aliases are applied the list may have duplicates. The fix here is to perform another pass to remove duplicates after the aliases have been processed. * Fix a miscompile for s390x with constants This carries over a narrow fix from #4427 to prior release branches. The patch here was created by `@uweigand` during the investigation for #4487. * Add release notes
With the merge of GHSA-7f6x-jwh5-m9r4 and GHSA-5fhj-g3p3-pq9g to the
main
branch (and therelease-0.{38,39.0}
branches) CI now appears to be failing across the board. Failure logs include:all
test failuresfiletest
failures -- only happens onrelease-0.{38,39}.0
, fixed onmain
by s390x: Implement full SIMD support #4427I think #4486 will fix the SIGKILL issues.
I have attempted to reproduce the
filetest
failures locally and cannot (where I think I'm using the same version of QEMU). @uweigand are you perhaps around to help debug thefiletest
issue?I have not investigate the s390x
all
failures yet.The text was updated successfully, but these errors were encountered: