diff --git a/Cargo.lock b/Cargo.lock index b9f31b98..21c7d07e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,18 +18,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.4" @@ -66,15 +54,6 @@ version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] - [[package]] name = "arrayvec" version = "0.7.6" @@ -226,9 +205,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cab" @@ -468,17 +447,6 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "digest" version = "0.10.7" @@ -507,7 +475,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -523,9 +491,9 @@ dependencies = [ [[package]] name = "dump_syms" -version = "2.3.6" +version = "2.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c39740e8d64a6343d46d1d5691b5c8a06a78d8e0f1e8a453230dd4a9436f9a" +checksum = "80c7fb163d4350f0527285b3e48ee7d4905ebd94a4a78f836408902944fc0f1a" dependencies = [ "anyhow", "bitflags 2.10.0", @@ -599,7 +567,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -868,16 +836,6 @@ dependencies = [ "scroll 0.12.0", ] -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "serde", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -1195,12 +1153,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - [[package]] name = "leb128" version = "0.2.5" @@ -1209,9 +1161,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.180" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libredox" @@ -1453,24 +1405,15 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "wasi", "windows-sys 0.61.2", ] -[[package]] -name = "msvc-demangler" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4c25a3bb7d880e8eceab4822f3141ad0700d20f025991c1f03bd3d00219a5fc" -dependencies = [ - "bitflags 2.10.0", -] - [[package]] name = "msvc-demangler" version = "0.11.0" @@ -1524,9 +1467,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" [[package]] name = "num-derive" @@ -1811,9 +1754,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ "bytes", "getrandom 0.3.4", @@ -1861,9 +1804,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha", "rand_core", @@ -2072,7 +2015,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2101,9 +2044,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring", "rustls-pki-types", @@ -2149,7 +2092,7 @@ dependencies = [ "lzma-rs", "macho-unwind-info", "memchr", - "msvc-demangler 0.11.0", + "msvc-demangler", "nom", "object", "pdb-addr2line 0.11.2", @@ -2389,9 +2332,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "symbolic" -version = "12.17.1" +version = "12.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f95842b7b62712fd9acfc5eb2d5d9d684c0873ca207884a33906964bad15ad" +checksum = "4e832005e6261d508717815bac8e2c096161b33b713a032861b3a13ae4cd60ed" dependencies = [ "symbolic-cfi", "symbolic-common", @@ -2401,20 +2344,20 @@ dependencies = [ [[package]] name = "symbolic-cfi" -version = "12.17.1" +version = "12.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "326ed0dcf1d9eeb340dcc540f2dda46ce5ec016c28b49dd17c442f3dbc83e4ea" +checksum = "e8d7ae026fdd9ac37fa77d956aabb60d8cc306bd4f5a38eafc28ad2a003e14cf" dependencies = [ "symbolic-common", "symbolic-debuginfo", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "symbolic-common" -version = "12.17.1" +version = "12.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520cf51c674f8b93d533f80832babe413214bb766b6d7cb74ee99ad2971f8467" +checksum = "332615d90111d8eeaf86a84dc9bbe9f65d0d8c5cf11b4caccedc37754eb0dcfd" dependencies = [ "debugid", "memmap2", @@ -2424,9 +2367,9 @@ dependencies = [ [[package]] name = "symbolic-debuginfo" -version = "12.17.1" +version = "12.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6dd2c67c72d424d7d57c0bbcb31a24f86e89c9c9c9419411a1608f9edb00ad" +checksum = "8e74486a57b6787aa1bfb15bf7c33860ca6a99e527f2f235bc5f56903e5eeb10" dependencies = [ "debugid", "elementtree", @@ -2435,7 +2378,6 @@ dependencies = [ "flate2", "gimli 0.32.3", "goblin 0.8.2", - "lazy_static", "nom", "nom-supreme", "once_cell", @@ -2449,7 +2391,7 @@ dependencies = [ "srcsrv", "symbolic-common", "symbolic-ppdb", - "thiserror 1.0.69", + "thiserror 2.0.18", "wasmparser", "zip", "zstd", @@ -2457,29 +2399,29 @@ dependencies = [ [[package]] name = "symbolic-demangle" -version = "12.17.1" +version = "12.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f0de2ee0ffa2641e17ba715ad51d48b9259778176517979cb38b6aa86fa7425" +checksum = "912017718eb4d21930546245af9a3475c9dccf15675a5c215664e76621afc471" dependencies = [ "cc", "cpp_demangle", - "msvc-demangler 0.10.1", + "msvc-demangler", "rustc-demangle", "symbolic-common", ] [[package]] name = "symbolic-ppdb" -version = "12.17.1" +version = "12.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb2e2755539a6a8fb716ce4bc7680179aacc4d72650daf77c1f73fc76d2f0a5" +checksum = "7df93324d740d1d12256b8ddcd69c6e37ceeb511f3a37cd063b596fd768756e0" dependencies = [ "flate2", "indexmap", "serde", "serde_json", "symbolic-common", - "thiserror 1.0.69", + "thiserror 2.0.18", "uuid", "watto", ] @@ -2543,7 +2485,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2588,9 +2530,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.45" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", @@ -2603,15 +2545,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.25" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -2777,6 +2719,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + [[package]] name = "typenum" version = "1.19.0" @@ -2933,13 +2881,12 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.214.0" +version = "0.243.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5309c1090e3e84dad0d382f42064e9933fdaedb87e468cc239f0eabea73ddcb6" +checksum = "f6d8db401b0528ec316dfbe579e6ab4152d61739cfe076706d2009127970159d" dependencies = [ - "ahash", "bitflags 2.10.0", - "hashbrown 0.14.5", + "hashbrown 0.15.5", "indexmap", "semver", "serde", @@ -2947,12 +2894,13 @@ dependencies = [ [[package]] name = "watto" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6746b5315e417144282a047ebb82260d45c92d09bf653fa9ec975e3809be942b" +checksum = "bfbc1480663d640f8c9f7a1ac70922eea60ac16fea79df883177df3bc7bb8b49" dependencies = [ + "hashbrown 0.15.5", "leb128", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] @@ -3300,18 +3248,15 @@ dependencies = [ [[package]] name = "zip" -version = "2.4.2" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" +checksum = "c42e33efc22a0650c311c2ef19115ce232583abbe80850bc8b66509ebef02de0" dependencies = [ - "arbitrary", "crc32fast", - "crossbeam-utils", - "displaydoc", "flate2", "indexmap", "memchr", - "thiserror 2.0.18", + "typed-path", "zopfli", ] diff --git a/Cargo.toml b/Cargo.toml index 9a005f05..fb01891e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ description = "Rust rewrite of Breakpad's minidump_writer" repository = "https://github.com/rust-minidump/minidump-writer" homepage = "https://github.com/rust-minidump/minidump-writer" edition = "2024" -rust-version = "1.85.0" +rust-version = "1.88.0" license = "MIT" [dependencies] diff --git a/src/linux/maps_reader.rs b/src/linux/maps_reader.rs index af8001fd..ee3a302c 100644 --- a/src/linux/maps_reader.rs +++ b/src/linux/maps_reader.rs @@ -182,11 +182,11 @@ impl MappingInfo { let is_path = is_mapping_a_path(pathname.as_deref()); - if let Some(linux_gate_loc) = linux_gate_loc.map(|u| usize::try_from(u).unwrap()) { - if !is_path && start_address == linux_gate_loc { - pathname = Some(LINUX_GATE_LIBRARY_NAME.into()); - offset = 0; - } + if let Some(linux_gate_loc) = linux_gate_loc.map(|u| usize::try_from(u).unwrap()) + && (!is_path && (start_address == linux_gate_loc)) + { + pathname = Some(LINUX_GATE_LIBRARY_NAME.into()); + offset = 0; } if let Some(prev_module) = infos.last_mut() { @@ -317,10 +317,10 @@ impl MappingInfo { // because the semantics of the open may be driver-specific so we'd risk // hanging the crash dumper. And a file in /dev/ almost certainly has no // ELF file identifier anyways. - if let Some(name) = name { - if name.as_bytes().starts_with(b"/dev/") { - return false; - } + if let Some(name) = name + && name.as_bytes().starts_with(b"/dev/") + { + return false; } true } @@ -491,11 +491,11 @@ impl SoVersion { if i >= comps.len() - 1 { break; } - if let Some(pre) = comp.rfind(|c: char| !c.is_ascii_digit()) { - if let Ok(pre) = comp[pre + 1..].parse() { - *comps[i + 1] = pre; - break; - } + if let Some(pre) = comp.rfind(|c: char| !c.is_ascii_digit()) + && let Ok(pre) = comp[pre + 1..].parse() + { + *comps[i + 1] = pre; + break; } } else { *comps[i] = comp.parse().unwrap_or_default(); diff --git a/src/linux/minidump_writer/mod.rs b/src/linux/minidump_writer/mod.rs index b86593cc..d81b79d6 100644 --- a/src/linux/minidump_writer/mod.rs +++ b/src/linux/minidump_writer/mod.rs @@ -886,25 +886,24 @@ impl MinidumpWriter { continue; } - if let Some(stack_map) = stack_mapping { - if stack_map.contains_address(addr) { - continue; - } + if let Some(stack_map) = stack_mapping + && stack_map.contains_address(addr) + { + continue; } - if let Some(last_hit) = last_hit_mapping { - if last_hit.contains_address(addr) { - continue; - } + if let Some(last_hit) = last_hit_mapping + && last_hit.contains_address(addr) + { + continue; } let test = addr >> shift; - if could_hit_mapping[(test >> 3) & array_mask] & (1 << (test & 7)) != 0 { - if let Some(hit_mapping) = self.find_mapping_no_bias(addr) { - if hit_mapping.is_executable() { - last_hit_mapping = Some(hit_mapping); - continue; - } - } + if (could_hit_mapping[(test >> 3) & array_mask] & (1 << (test & 7)) != 0) + && let Some(hit_mapping) = self.find_mapping_no_bias(addr) + && hit_mapping.is_executable() + { + last_hit_mapping = Some(hit_mapping); + continue; } sp.copy_from_slice(&defaced); }