get_dynamo_library_bounds sometimes does not correctly find bounds
Created by: Carrotman42
Internally we have a heisenbug which is causing a hang on static detach via dr_app_stop_and_cleanup_with_stats
. (Given a fixed compilation/configuration for a specific application the bug is always or never there, but we do not know exactly what compiler feature/runtime configuration is causing the bug to show up: the bug keeps showing up and disappearing depending on where we are sync'd in the source history.) This bug tracks its resolution in relation to DR core code.
I was able to show that when there is a detach hang, get_dynamo_library_bounds
is not "correctly" discovering the full bounds of DR code; that is, in one instance the bounds were found to be [0x13200000
, 0x1d600000
) whereas dr_app_stop_and_cleanup_with_stats
had an address of 0x131eb110
.
It is unclear at this point if the bug is truly related to the code layout of the binary (e.g. the layout algorithms just so happen to place dr_app_stop_and_cleanup_with_stats far away from all other DR code) or if it's related to a bug in get_dynamo_library_bounds
(e.g. not correctly handling some edge case in its scanning and heuristics).
xref PR#3359, which was also related to debugging this issue.