backtrace-rs
backtrace-rs copied to clipboard
Why do we mmap data that is already mmapped?
The basic strategy for backtrace symbolication on Linux:
- We use a combination of
dl_iterate_phdrand opening/proc/self/mapsto learn about what memory objects are loaded - We obtain a bunch of filenames for these memory objects, their dynamic libraries
- We then later mmap these filenames into memory.
- ...WAIT A TICK?!?
...why do we map things into memory that we almost certainly know are already in-memory objects?