Open
Description
There is a crate findshlibs which does 99% the same thing as our machinery for getting the list of shared objects on Linux, except that it has cross-platform support.
This can be an avenue for quickly spinning up macOS/Windows support. However, we might need to fix a few things about this library before using it (and thus possibly depend on a fork, rather than on the upstream gimli-rs repo, until they are willing to merge our changes).
- It doesn't provide a way to get the file offset of a mapping, even on platforms that support it. I'm not sure if this is actually important; pprof seems to work fine if we just fill in
0
for the file offset of a mapping - We need to land fix: add missing
wrapping_add
gimli-rs/findshlibs#81 as this will cause panics in debug mode on certain versions of Linux otherwise (see the comment here). - In various places that library assumes that
u64
can be cast tousize
, see e.g. here . We need to either carefully audit every case of this and ensure that it is valid even on 32-bit platforms, or (my preference) banas
from the codebase and use properly checked conversions.
Alternatively, we can decide not to use this library, and just write the Windows/macOS support by hand, as we already did for Linux.
Tagging @roblabla who has expressed interest in working on Windows support.
Metadata
Metadata
Assignees
Labels
No labels