You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I am not too familiar with the overall organization, it was not obvious to me how to achieve this, but ideally, we should not do this repeatedly.
The text was updated successfully, but these errors were encountered:
bgedik
changed the title
/proc/<id>/maps can be read once for stack trace extraction
/proc/<id>/maps can be read once per stack trace extraction
Oct 16, 2018
Good point. It can be done via a hash map that would cache binaryname => base value
The map is accessed safely in bfd_vma compute_maps_base(const char * binfile) which is called via resolve(). resolve() operates under _lib_mutex which protects for multi-thread access.
If the process dynamically loads dynamic modules (as opposed to simply inking with) we will have to open /proc each time we do not find a binary in the map.
One concern: If the same library is dynamically loaded/unloaded multiple times, it is not guaranteed to be mapped to the same location. Could it be safer to do this once at the beginning of stack trace extraction?
Since I am not too familiar with the overall organization, it was not obvious to me how to achieve this, but ideally, we should not do this repeatedly.
The text was updated successfully, but these errors were encountered: