[PATCH] D24699: [asan] Allow re-exec in instrumented unit tests on Darwin (fix unit tests on macOS <=10.10)

Anna Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 29 13:36:11 PST 2016


zaks.anna accepted this revision.
zaks.anna added a reviewer: zaks.anna.
zaks.anna added a comment.
This revision is now accepted and ready to land.

LGTM

For non-tests, ReexecDisabled is defined to always return false (in sanitizer_mac.cc). So with this patch, the behavior of instrumented tests will match ASan's default behavior, which brings testing setup closer to the default setup.

ReexecDisabled will only ever be returning true when we are running non-instrumented tests. The reason that is needed is that dyld uses the instrumented binary as a clue to find out if the binary is ASanified and if it should launch the process with DYLD_INTERPOSITION. The default implementation relies on this behavior, if it's not present, we need to re-exact.


https://reviews.llvm.org/D24699





More information about the llvm-commits mailing list