From 72135f7952d50557cfd081146a60391e91770c5e Mon Sep 17 00:00:00 2001 From: Andrew Gallagher Date: Wed, 25 Oct 2023 19:55:23 -0700 Subject: [PATCH] Upgrade from memmap to memmap2 The former appears to be unmaintained: https://github.com/danburkert/memmap-rs/issues/90 --- Cargo.lock | 17 +++++++++++++---- Cargo.toml | 2 +- src/binary_parser.rs | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5381c9a3..1ebcb260 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ dependencies = [ "cpp_demangle", "fallible-iterator", "gimli", - "memmap2", + "memmap2 0.5.10", "object", "rustc-demangle", "smallvec", @@ -758,9 +758,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -880,6 +880,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1079,7 +1088,7 @@ dependencies = [ "libc", "log", "lru", - "memmap", + "memmap2 0.9.4", "proc-maps", "py-spy-testdata", "rand", diff --git a/Cargo.toml b/Cargo.toml index cdfbd569..9074c82f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ lru = "0.10" regex = ">=1.6.0" tempfile = "3.6.0" proc-maps = "0.3.2" -memmap = "0.7.0" +memmap2 = "0.9.4" cpp_demangle = "0.4" serde = {version="1.0", features=["rc"]} serde_derive = "1.0" diff --git a/src/binary_parser.rs b/src/binary_parser.rs index 057fed67..08a09a99 100644 --- a/src/binary_parser.rs +++ b/src/binary_parser.rs @@ -4,7 +4,7 @@ use std::path::Path; use anyhow::Error; use goblin::Object; -use memmap::Mmap; +use memmap2::Mmap; pub struct BinaryInfo { pub filename: std::path::PathBuf,