ianlancetaylor / libbacktrace

A C library that may be linked into a C/C++ program to produce symbolic backtraces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

some issues & fixes

jmberg opened this issue · comments

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?

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.

Optimistically closing as fixed. Please comment if you disagree. Thanks for reporting.

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)