Fix CI for main (#4486)

* Skip new `table_ops` test under emulation

When emulating we already have to disable most pooling-allocator related
tests so this commit carries over that logic to the new fuzz test which
may run some configurations with the pooling allocator depending on the
random input.

* 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.
This commit is contained in:
Alex Crichton
2022-07-20 16:39:59 -05:00
committed by GitHub
parent 2ba4bce5cc
commit 2127c3a369
2 changed files with 11 additions and 0 deletions

View File

@@ -603,9 +603,14 @@ impl<I: VCodeInst> VCodeBuilder<I> {
// will be returned directly to `regalloc2` eventually and all
// operands/results of instructions will use the alias-resolved vregs
// from `regalloc2`'s perspective.
//
// Also note that `reftyped_vregs` can't have duplicates, so after the
// aliases are applied duplicates are removed.
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();

View File

@@ -716,6 +716,12 @@ fn table_ops_eventually_gcs() {
use arbitrary::Unstructured;
use rand::prelude::*;
// Skip if we're under emulation because some fuzz configurations will do
// large address space reservations that QEMU doesn't handle well.
if std::env::var("WASMTIME_TEST_NO_HOG_MEMORY").is_ok() {
return;
}
let mut rng = SmallRng::seed_from_u64(0);
let mut buf = vec![0; 2048];
let n = 100;