-
-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
When parsing private symbols in my application I get the following panic:
thread 'main' panicked at 'attempt to subtract with overflow', C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\pdb-0.6.0\src\omap.rs:451:32
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/7f7a1cbfd3b55daee191247770627afab09eece2\/library\std\src\panicking.rs:483
1: core::panicking::panic_fmt
at /rustc/7f7a1cbfd3b55daee191247770627afab09eece2\/library\core\src\panicking.rs:85
2: core::panicking::panic
at /rustc/7f7a1cbfd3b55daee191247770627afab09eece2\/library\core\src\panicking.rs:50
3: pdb::omap::get_virtual_address
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\pdb-0.6.0\src\omap.rs:451
4: pdb::common::PdbInternalSectionOffset::to_internal_rva
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\pdb-0.6.0\src\omap.rs:577
5: pdb::common::PdbInternalSectionOffset::to_rva
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\pdb-0.6.0\src\omap.rs:570
get_virtual_address
is implemented as follows:
fn get_virtual_address(sections: &[ImageSectionHeader], section: u16, offset: u32) -> Option<u32> {
let section = sections.get(section as usize - 1)?;
Some(section.virtual_address + offset)
}
I believe that this would indicate section
has a value of 0
in this context but I have not dumped it yet. Unfortunately I cannot provide a reproducible testcase considering the PDB is private. I can however provide any additional metadata required to help debug the issue in full.
Metadata
Metadata
Assignees
Labels
No labels