From b0a10d613b83079799bbd32075bc1d2b65e8d5d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 00:01:48 +0000 Subject: [PATCH 1/3] build(deps): bump rust-vmm-ci from `042b206` to `b4bb768` Bumps [rust-vmm-ci](https://github.com/rust-vmm/rust-vmm-ci) from `042b206` to `b4bb768`. - [Commits](https://github.com/rust-vmm/rust-vmm-ci/compare/042b2063b276a7593aeee24e8ca4f8eef2c8ac7e...b4bb7687a11bc6bdb07a37b71d2795b9fe77863f) --- updated-dependencies: - dependency-name: rust-vmm-ci dependency-version: b4bb7687a11bc6bdb07a37b71d2795b9fe77863f dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- rust-vmm-ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-vmm-ci b/rust-vmm-ci index 042b2063..b4bb7687 160000 --- a/rust-vmm-ci +++ b/rust-vmm-ci @@ -1 +1 @@ -Subproject commit 042b2063b276a7593aeee24e8ca4f8eef2c8ac7e +Subproject commit b4bb7687a11bc6bdb07a37b71d2795b9fe77863f From 14fa00473bb7a2101f26aa54c82ea6cbe93e9956 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Mon, 10 Nov 2025 08:45:00 +0100 Subject: [PATCH 2/3] chore: fix clippy lints/cargo warnings The main one I am not sure about is the change of the ffi calling convension in the windows code. According to rust-lang#137018, "stdcall" is only for 32bit targets, which we do not support, and everything else should just use "C". There are some more fixes than what the CI complains about, because the CI does not run clippy on the windows target, but my local setup does, so I fixed up some additional warnings. Signed-off-by: Patrick Roy --- src/mmap/unix.rs | 2 +- src/mmap/windows.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mmap/unix.rs b/src/mmap/unix.rs index eea4788e..f47e8e79 100644 --- a/src/mmap/unix.rs +++ b/src/mmap/unix.rs @@ -395,7 +395,7 @@ impl VolatileMemory for MmapRegion { &self, offset: usize, count: usize, - ) -> volatile_memory::Result>> { + ) -> volatile_memory::Result>> { let _ = self.compute_end_offset(offset, count)?; Ok( diff --git a/src/mmap/windows.rs b/src/mmap/windows.rs index 6d723917..c87113ce 100644 --- a/src/mmap/windows.rs +++ b/src/mmap/windows.rs @@ -18,7 +18,7 @@ use crate::volatile_memory::{self, compute_offset, VolatileMemory, VolatileSlice #[allow(non_snake_case)] #[link(name = "kernel32")] -extern "stdcall" { +extern "system" { pub fn VirtualAlloc( lpAddress: *mut c_void, dwSize: size_t, @@ -55,7 +55,7 @@ const MEM_RELEASE: u32 = 0x00008000; const FILE_MAP_ALL_ACCESS: u32 = 0xf001f; const PAGE_READWRITE: u32 = 0x04; -pub const MAP_FAILED: *mut c_void = 0 as *mut c_void; +pub const MAP_FAILED: *mut c_void = null_mut::(); pub const INVALID_HANDLE_VALUE: RawHandle = (-1isize) as RawHandle; #[allow(dead_code)] pub const ERROR_INVALID_PARAMETER: i32 = 87; @@ -95,7 +95,7 @@ impl MmapRegion { } // This is safe because we are creating an anonymous mapping in a place not already used by // any other area in this process. - let addr = unsafe { VirtualAlloc(0 as *mut c_void, size, MEM_COMMIT, PAGE_READWRITE) }; + let addr = unsafe { VirtualAlloc(null_mut::(), size, MEM_COMMIT, PAGE_READWRITE) }; if addr == MAP_FAILED { return Err(io::Error::last_os_error()); } @@ -111,7 +111,7 @@ impl MmapRegion { /// /// # Arguments /// * `file_offset` - The mapping will be created at offset `file_offset.start` in the file - /// referred to by `file_offset.file`. + /// referred to by `file_offset.file`. /// * `size` - The size of the memory region in bytes. pub fn from_file(file_offset: FileOffset, size: usize) -> io::Result { let handle = file_offset.file().as_raw_handle(); @@ -151,7 +151,7 @@ impl MmapRegion { CloseHandle(mapping); } - if addr == null_mut() { + if addr.is_null() { return Err(io::Error::last_os_error()); } Ok(Self { @@ -200,7 +200,7 @@ impl VolatileMemory for MmapRegion { &self, offset: usize, count: usize, - ) -> volatile_memory::Result>> { + ) -> volatile_memory::Result>> { let end = compute_offset(offset, count)?; if end > self.size { return Err(volatile_memory::Error::OutOfBounds { addr: end }); From 31cfd8aa6c31512261d2d51bf4d60537296e91f8 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Thu, 20 Nov 2025 08:26:39 +0100 Subject: [PATCH 3/3] chore: update coverage Signed-off-by: Patrick Roy --- coverage_config_x86_64.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coverage_config_x86_64.json b/coverage_config_x86_64.json index 2fa53707..9a32c287 100644 --- a/coverage_config_x86_64.json +++ b/coverage_config_x86_64.json @@ -1,5 +1,5 @@ { - "coverage_score": 91.52, + "coverage_score": 90.56, "exclude_path": "mmap_windows.rs", "crate_features": "backend-mmap,backend-atomic,backend-bitmap,iommu" }