diff --git a/Cargo.lock b/Cargo.lock index 1699a07442..def959fc7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -333,9 +333,9 @@ dependencies = [ [[package]] name = "capstone" -version = "0.9.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "178b3c80b4ce3939792d1dd6600575e012da806a10e81abe812dc29cbfe629ec" +checksum = "b08ca438d9585a2b216b0c2e88ea51e096286c5f197f7be2526bb515ef775b6c" dependencies = [ "capstone-sys", "libc", @@ -343,9 +343,9 @@ dependencies = [ [[package]] name = "capstone-sys" -version = "0.13.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2f3d97b88fa4a9a6464c7c08b8c4588aaea8c18d0651eca11f2ca15f50f1f6" +checksum = "fe7183271711ffb7c63a6480e4baf480e0140da59eeba9b18fcc8bf3478950e3" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index a3f26a5f19..6412d17a7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -251,7 +251,7 @@ env_logger = "0.10" log = { version = "0.4.8", default-features = false } clap = { version = "4.3.12", default-features = false, features = ["std", "derive"] } hashbrown = { version = "0.14", default-features = false } -capstone = "0.9.0" +capstone = "0.12.0" once_cell = "1.12.0" smallvec = { version = "1.6.1", features = ["union"] } tracing = "0.1.26" diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 685b1ca912..4555885858 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -205,11 +205,11 @@ version = "1.1.0" criteria = "safe-to-deploy" [[exemptions.capstone]] -version = "0.9.0" +version = "0.12.0" criteria = "safe-to-deploy" [[exemptions.capstone-sys]] -version = "0.13.0" +version = "0.16.0" criteria = "safe-to-deploy" [[exemptions.cast]] diff --git a/winch/filetests/src/disasm.rs b/winch/filetests/src/disasm.rs index 5c921d0418..a140f2b8e7 100644 --- a/winch/filetests/src/disasm.rs +++ b/winch/filetests/src/disasm.rs @@ -33,6 +33,7 @@ pub fn disasm( let is_jump = detail .groups() + .iter() .find(|g| g.0 as u32 == CS_GRP_JUMP) .is_some(); @@ -67,8 +68,12 @@ pub fn disasm( // Flip write_offsets to true once we've seen a `ret`, as instructions that follow the // return are often related to trap tables. - write_offsets = - write_offsets || detail.groups().find(|g| g.0 as u32 == CS_GRP_RET).is_some(); + write_offsets = write_offsets + || detail + .groups() + .iter() + .find(|g| g.0 as u32 == CS_GRP_RET) + .is_some(); line })