mstange / framehop

Stack unwinding library in Rust
Apache License 2.0
82 stars 11 forks source link

Remove any uses of file ranges. #20

Closed mstange closed 9 months ago

mstange commented 9 months ago

The text bytes are only used by macOS "Compact Unwind Info"-guided unwinding. Before #11, we were computing offset_from_base in that code based on the text segment/section start SVMA and the base SVMA. In #11 this code was changed to use the file range, but this is actually incorrect; file offsets are not always equivalent to relative-to-base addresses, for example in the dyld shared cache. Furthermore, in samply's case, we're getting these bytes straight from the other process's memory, so we're not interested in any information about the file anyway.

This PR changes things back to deal in terms of SVMAs.

r? @afranchuk