backtrace-rs icon indicating copy to clipboard operation
backtrace-rs copied to clipboard

Why do we mmap data that is already mmapped?

Open workingjubilee opened this issue 1 year ago • 5 comments

The basic strategy for backtrace symbolication on Linux:

  • We use a combination of dl_iterate_phdr and opening /proc/self/maps to 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?

workingjubilee avatar Sep 09 '24 03:09 workingjubilee