Skip to content

Commit 1166cc8

Browse files
Try not parsing the entire map
1 parent cb775f1 commit 1166cc8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/symbolize/gimli/parse_running_mmaps_unix.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,20 @@ impl FromStr for MapsEntry {
103103
} else {
104104
return Err(parse_err);
105105
};
106-
let _perms = if let &[r, w, x, p, ..] = perms_str.as_bytes() {
107-
// If a system in the future adds a 5th field to the permission list,
108-
// there's no reason to assume previous fields were invalidated.
109-
[r, w, x, p]
110-
} else {
111-
return Err(parse_err);
112-
};
113-
let _offset = hex(offset_str)?;
114-
let _dev = if let Some((major, minor)) = dev_str.split_once(':') {
115-
(hex(major)?, hex(minor)?)
116-
} else {
117-
return Err(parse_err);
118-
};
119-
let _inode = hex(inode_str)?;
106+
// let _perms = if let &[r, w, x, p, ..] = perms_str.as_bytes() {
107+
// // If a system in the future adds a 5th field to the permission list,
108+
// // there's no reason to assume previous fields were invalidated.
109+
// [r, w, x, p]
110+
// } else {
111+
// return Err(parse_err);
112+
// };
113+
// let _offset = hex(offset_str)?;
114+
// let _dev = if let Some((major, minor)) = dev_str.split_once(':') {
115+
// (hex(major)?, hex(minor)?)
116+
// } else {
117+
// return Err(parse_err);
118+
// };
119+
// let _inode = hex(inode_str)?;
120120
let pathname = pathname_str.into();
121121

122122
Ok(MapsEntry {

0 commit comments

Comments
 (0)