Closed pablogsal closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.97%. Comparing base (
41248ed
) to head (a347134
). Report is 72 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The _dyld_shared_cache_contains_path is only available in macOS 11.0 or later. As we are compiling in a new system that's newer than 11.0 but setting the deployment target to an older version, it's possible that the _dyld_shared_cache_contains_path is not available in the target platform and in that case we will segfault when calling it. It's also possible that when compiling memray in an old system _dyld_shared_cache_contains_path is not even prototyped in the headers.
To handle this, we change to fetch the function via a dlopen/dlsym approach that will be generic in all macOS versions at the cost of an extra call to dlopen the first time we interpose symbols.