some issues & fixes
jmberg opened this issue · comments
jmberg commented
I can't really sign the CLA right now easily, but I can give you a list of issues I encountered & had to fix:
- the typedef of backtrace_error_callback shouldn't use "errnum" as that may be a macro in some windows environments
- there's another corruption bug with size_t just like the rust folks reported, with fhdr_off in pecoff.c
- what you read as virtual_size in pecoff really seems to be physical_addr?
Ian Lance Taylor commented
Can you point me to some example of errno
defined as a preprocessor macro? I can't find any evidence of that, and I don't want to change the code for no reason. Thanks.
Ian Lance Taylor commented
vritual_size is correct for PE executables; see https://msdn.microsoft.com/en-us/library/windows/desktop/ms680341(v=vs.85).aspx
Ian Lance Taylor commented
Optimistically closing as fixed. Please comment if you disagree. Thanks for reporting.
jmberg commented
Thanks.
- virtual_size - I was also reading .o files, not just .exe files, maybe the difference is there? Basically I'm using this code as a more generic dwarf parser.
errnum
- I can't figure it out myself anymore, so it was probably in cygwin (I switched to mingw64 recently, and can't reproduce the issue I had back then)