Skip to content

Commit

Permalink
build: Update minidump to 0.22.0 (#3992)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-auer authored Sep 5, 2024
1 parent 6aefa52 commit 7b706ea
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 96 deletions.
161 changes: 69 additions & 92 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ maxminddb = "0.23.0"
memchr = "2.7.4"
md5 = "0.7.0"
mime = "0.3.16"
minidump = "0.15.2"
minidump = "0.22.0"
multer = "2.0.4"
num-traits = "0.2.18"
num_cpus = "1.13.0"
Expand Down
1 change: 1 addition & 0 deletions relay-pii/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ workspace = true
[dependencies]
hmac = { workspace = true }
minidump = { workspace = true }
num-traits = { workspace = true }
once_cell = { workspace = true }
pest = { workspace = true }
pest_derive = { workspace = true }
Expand Down
7 changes: 4 additions & 3 deletions relay-pii/src/minidumps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use minidump::{
Endian, Error as MinidumpError, Minidump, MinidumpMemoryList, MinidumpModuleList,
MinidumpThreadList,
};
use num_traits::FromPrimitive;
use relay_event_schema::processor::{FieldAttrs, Pii, ValueType};
use utf16string::{Utf16Error, WStr};

Expand Down Expand Up @@ -203,14 +204,14 @@ impl<'a> MinidumpData<'a> {
.get(cv_start..)
.ok_or(ScrubMinidumpError::InvalidAddress)?;
let signature = u32_from_bytes(signature_bytes, self.minidump.endian)?;
match CvSignature::try_from(signature) {
Ok(CvSignature::Pdb70) => {
match CvSignature::from_u32(signature) {
Some(CvSignature::Pdb70) => {
let offset: usize = 4 + (4 + 2 + 2 + 8) + 4; // cv_sig + sig GUID + age
items.push(MinidumpItem::DebugModuleName(
(cv_start + offset)..(cv_start + cv_len),
));
}
Ok(CvSignature::Pdb20) => {
Some(CvSignature::Pdb20) => {
let offset: usize = 4 + 4 + 4 + 4; // cv_sig + cv_offset + sig + age
items.push(MinidumpItem::DebugModuleName(
(cv_start + offset)..(cv_start + cv_len),
Expand Down

0 comments on commit 7b706ea

Please sign in to comment.