rainers / cv2pdb

converter of DMD CodeView/DWARF debug information to PDB files
Artistic License 2.0
466 stars 110 forks source link

Uninitialized DWARF_LineState.last_addr #43

Closed vlmillet closed 5 years ago

vlmillet commented 5 years ago

When the first state machine state in dwarf is a "reuse previous address" (adr == 0 in code), state.address become the value of state.last_addr which is not initialized to 0 and then corrupt every following reading (in my case Oxcccccccc). See code in dwarflines.cpp line ~247 To fix this I initialized last_addr to 0 which should be the default value if no address hasn't been set before in dwarf

rainers commented 5 years ago

Thanks for the report. I added the initialization to the constructor of DWARF_LineState.