Skip to content

Commit

Permalink
Allows for paths with trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
MasonRemaley committed Jul 24, 2023
1 parent ce72d89 commit 015cdb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/symbolize/gimli/parse_running_mmaps_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl FromStr for MapsEntry {
}

// Pathname may be omitted in which case it will be empty
let pathname_str = s.trim();
let pathname_str = s.trim_start();

let hex = |s| usize::from_str_radix(s, 16).map_err(|_| "Couldn't parse hex number");
let address = if let Some((start, limit)) = range_str.split_once('-') {
Expand Down Expand Up @@ -275,7 +275,7 @@ fn check_maps_entry_parsing_32bit() {
offset: 0x00000000,
dev: (0x08, 0x01),
inode: 0x60662705,
pathname: "/executable/path/with multiple-continues spaces".into(),
pathname: "/executable/path/with multiple-continues spaces ".into(),
}
);
assert_eq!(
Expand Down

0 comments on commit 015cdb8

Please sign in to comment.