Skip to content

Commit aeb25db

Browse files
committed
Allows for paths with trailing spaces
1 parent ce72d89 commit aeb25db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/symbolize/gimli/parse_running_mmaps_unix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl FromStr for MapsEntry {
115115
}
116116

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

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

0 commit comments

Comments
 (0)