rainers / cv2pdb

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

Crash using C++ executable with DWARF #22

Closed daniel-starke closed 6 years ago

daniel-starke commented 6 years ago

Using cv2pdb.exe my.exe (x64) results in a crash (Latest commit f75b963). Dr.Memory reports:

Error #4: UNADDRESSABLE ACCESS: reading 0x7b923044-0x7b923045 1 byte(s)
# 0 cv2pdb.exe!?                     +0x0      (0x013744d7 <cv2pdb.exe+0x144d7>)
# 1 cv2pdb.exe!?                     +0x0      (0x01370141 <cv2pdb.exe+0x10141>)
# 2 cv2pdb.exe!?                     +0x0      (0x013705ba <cv2pdb.exe+0x105ba>)
# 3 cv2pdb.exe!?                     +0x0      (0x01372842 <cv2pdb.exe+0x12842>)
# 4 cv2pdb.exe!?                     +0x0      (0x01378c59 <cv2pdb.exe+0x18c59>)
# 5 KERNEL32.dll!BaseThreadInitThunk +0x11     (0x769a336a <KERNEL32.dll+0x1336a>)
Note: @0:00:08.360 in thread 2856
Note: instruction: mov    (%eax) -> %dl
rainers commented 6 years ago

Can you provide the executable you've been trying to convert? What tool chain are you using?

daniel-starke commented 6 years ago

I am using GCC 7.2.0 with binutils 2.28 and MinGW-W64-5.0.2. See link. I will see if this error also happens with an executable I am free to provide. Sadly, this is not the case with the tested one.

daniel-starke commented 6 years ago

Can you provide a debug build? I can provide you a proper backtrace of cv2pdb if the debug information generated are supported by Dr.Memory.

daniel-starke commented 6 years ago

I have found another program of mine for which cv2pdb crashes. Feel free to try it out for yourself. https://www.sendspace.com/file/0jkebh

rainers commented 6 years ago

Should be fixed by https://github.com/rainers/cv2pdb/commit/edc8ac2e4ac38f973ebb259a6a75c1ea9db32072. cv2pdb should also be faster now for these large debug symbols.

You can grab a compiled version here: https://ci.appveyor.com/project/rainers/visuald/build/1.0.157/job/ntxqml59ppain85g/artifacts

daniel-starke commented 6 years ago

Thank you. That version works for me.