From c3e658f04445521f1d9836d338fd35b94582d251 Mon Sep 17 00:00:00 2001 From: Brian Caswell Date: Thu, 21 Sep 2023 09:12:57 -0400 Subject: [PATCH] update dependencies (#87) * update dependencies * backout update to memmap2, as that's pinnned in minidump-rs --------- Co-authored-by: Brian Caswell --- Cargo.toml | 30 +++++++++++++++--------------- src/bin/test.rs | 5 +++-- tests/ptrace_dumper.rs | 6 +++--- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 714c48b5..d7018923 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,23 +9,23 @@ edition = "2021" license = "MIT" [dependencies] -bitflags = "2.0" -byteorder = "1.3.2" +bitflags = "2.4" +byteorder = "1.4" cfg-if = "1.0" -crash-context = "0.6.1" +crash-context = "0.6" memoffset = "0.9" -minidump-common = "0.17.0" +minidump-common = "0.18" scroll = "0.11" -tempfile = "3.1.0" -thiserror = "1.0.21" +tempfile = "3.8" +thiserror = "1.0" [target.'cfg(unix)'.dependencies] -libc = "0.2.74" +libc = "0.2" goblin = "0.7" memmap2 = "0.5" [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] -nix = { version = "0.26", default-features = false, features = [ +nix = { version = "0.27", default-features = false, features = [ "mman", "process", "ptrace", @@ -36,7 +36,7 @@ nix = { version = "0.26", default-features = false, features = [ procfs-core = { version = "0.16.0-RC1", default-features = false } [target.'cfg(target_os = "windows")'.dependencies] -bitflags = "2.0" +bitflags = "2.4" [target.'cfg(target_os = "macos")'.dependencies] # Binds some additional mac specifics not in libc @@ -45,14 +45,14 @@ mach2 = "0.4" [dev-dependencies] # Minidump-processor is async so we need an executor futures = { version = "0.3", features = ["executor"] } -minidump = "0.17.0" +minidump = "0.18" memmap2 = "0.5" [target.'cfg(target_os = "macos")'.dev-dependencies] # We dump symbols for the `test` executable so that we can validate that minidumps # created by this crate can be processed by minidump-processor -dump_syms = { version = "2.0.0", default-features = false } -minidump-processor = { version = "0.17.0", default-features = false } -minidump-unwind = { version = "0.17", features = ["debuginfo"] } -similar-asserts = "1.2" -uuid = "1.0" +dump_syms = { version = "2.2", default-features = false } +minidump-processor = { version = "0.18", default-features = false } +minidump-unwind = { version = "0.18", features = ["debuginfo"] } +similar-asserts = "1.5" +uuid = "1.4" diff --git a/src/bin/test.rs b/src/bin/test.rs index 24e293c7..4a3a9bb2 100644 --- a/src/bin/test.rs +++ b/src/bin/test.rs @@ -15,6 +15,7 @@ mod linux { sys::mman::{mmap, MapFlags, ProtFlags}, unistd::getppid, }; + use std::os::fd::BorrowedFd; macro_rules! test { ($x:expr, $errmsg:expr) => { @@ -214,12 +215,12 @@ mod linux { let memory_size = std::num::NonZeroUsize::new(page_size.unwrap() as usize).unwrap(); // Get some memory to be mapped by the child-process let mapped_mem = unsafe { - mmap( + mmap::( None, memory_size, ProtFlags::PROT_READ | ProtFlags::PROT_WRITE, MapFlags::MAP_PRIVATE | MapFlags::MAP_ANON, - -1, + None, 0, ) .unwrap() diff --git a/tests/ptrace_dumper.rs b/tests/ptrace_dumper.rs index 0db0396f..1be27f08 100644 --- a/tests/ptrace_dumper.rs +++ b/tests/ptrace_dumper.rs @@ -7,7 +7,7 @@ use nix::sys::signal::Signal; use std::convert::TryInto; use std::io::{BufRead, BufReader}; use std::mem::size_of; -use std::os::unix::io::AsRawFd; +use std::os::unix::io::AsFd; use std::os::unix::process::ExitStatusExt; mod common; @@ -129,7 +129,7 @@ fn test_merged_mappings() { map_size, ProtFlags::PROT_READ, MapFlags::MAP_SHARED, - file.as_raw_fd(), + Some(file.as_fd()), 0, ) .unwrap() @@ -142,7 +142,7 @@ fn test_merged_mappings() { page_size, ProtFlags::PROT_NONE, MapFlags::MAP_SHARED | MapFlags::MAP_FIXED, - file.as_raw_fd(), + Some(file.as_fd()), // Map a different offset just to // better test real-world conditions. page_size.get().try_into().unwrap(), // try_into() in order to work for 32 and 64 bit