diff --git a/cranelift/codegen/src/machinst/vcode.rs b/cranelift/codegen/src/machinst/vcode.rs index f9ef6670f8..aa73ae041c 100644 --- a/cranelift/codegen/src/machinst/vcode.rs +++ b/cranelift/codegen/src/machinst/vcode.rs @@ -603,9 +603,14 @@ impl VCodeBuilder { // 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(); diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index ae15eac8dd..6d387f1c3e 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -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;