This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Track which modules are instrumented in LoadedModule objects
ClosedPublic

Authored by kubamracek on Jan 3 2017, 4:27 PM.

Details

Summary

This patch adds tracking which modules are instrumented and which are not. On macOS, instrumented modules link against the ASan/TSan/... dylib, so we can just check if such a load command exists or not.

This is needed to implement a feature that needs to know if an interceptor is called from instrumented code or not (then it's likely a system library). The patch for that will follow.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek updated this revision to Diff 82972.Jan 3 2017, 4:27 PM
kubamracek retitled this revision from to [sanitizer] Track which modules are instrumented in LoadedModule objects.
kubamracek updated this object.
kubamracek set the repository for this revision to rL LLVM.
kubamracek added a project: Restricted Project.
kubamracek added a subscriber: llvm-commits.

https://reviews.llvm.org/D28264 ("Implement a 'ignore_noninstrumented_modules' flag to better suppress false positive races") builds on top of this patch.

dvyukov accepted this revision.Jan 5 2017, 2:02 AM
dvyukov edited edge metadata.
This revision is now accepted and ready to land.Jan 5 2017, 2:02 AM
This revision was automatically updated to reflect the committed changes.