Skip to content
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: Upgrade QEMU to 8.1.1 #7096

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ jobs:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
QEMU_BUILD_VERSION: 8.0.4
QEMU_BUILD_VERSION: 8.1.1
strategy:
fail-fast: true
matrix: ${{ fromJson(needs.determine.outputs.test-matrix) }}
Expand Down Expand Up @@ -435,7 +435,6 @@ jobs:
# quickly.
curl https://download.qemu.org/qemu-$QEMU_BUILD_VERSION.tar.xz | tar xJf -
cd qemu-$QEMU_BUILD_VERSION
patch -p1 < $GITHUB_WORKSPACE/ci/qemu-cpuinfo.patch
./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache}}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs
ninja -C build install
touch ${{ runner.tool_cache }}/qemu/built
Expand Down
2 changes: 1 addition & 1 deletion ci/build-test-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const array = [
"target": "riscv64gc-unknown-linux-gnu",
"gcc_package": "gcc-riscv64-linux-gnu",
"gcc": "riscv64-linux-gnu-gcc",
"qemu": "qemu-riscv64 -cpu rv64,v=true,vlen=256,vext_spec=v1.0,zba=true,zbb=true,zbc=true,zbs=true,zbkb=true -L /usr/riscv64-linux-gnu",
"qemu": "qemu-riscv64 -cpu rv64,v=true,vlen=256,vext_spec=v1.0,zba=true,zbb=true,zbc=true,zbs=true,zbkb=true,zcb=true -L /usr/riscv64-linux-gnu",
"qemu_target": "riscv64-linux-user",
"name": "Test Linux riscv64",
"filter": "linux-riscv64",
Expand Down
115 changes: 0 additions & 115 deletions ci/qemu-cpuinfo.patch

This file was deleted.

15 changes: 5 additions & 10 deletions tests/all/traps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1347,23 +1347,18 @@ fn wasm_fault_address_reported_by_default() -> Result<()> {
)?;
let err = Instance::new(&mut store, &module, &[]).unwrap_err();

// On s390x faulting addressess are rounded to the nearest page boundary
// instead of having the precise address reported.
let mut expected_addr = 0xdeadbeef_u32;
if cfg!(target_arch = "s390x") {
expected_addr &= 0xfffff000;
}

// NB: at this time there's no programmatic access to the fault address
// because it's not always available for load/store traps. Only static
// memories on 32-bit have this information, but bounds-checked memories
// use manual trapping instructions and otherwise don't have a means of
// communicating the faulting address at this time.
//
// It looks like the exact reported fault address may not be deterministic,
// so assert that we have the right error message, but not the exact address.
let err = format!("{err:?}");
assert!(
err.contains(&format!(
"memory fault at wasm address 0x{expected_addr:x} in linear memory of size 0x10000"
)),
err.contains("memory fault at wasm address ")
&& err.contains(" in linear memory of size 0x10000"),
"bad error: {err}"
);
Ok(())
Expand Down