[PATCH] D18212: [sanitizer] On OS X, verify that interceptors work and abort if not, take 2

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 08:30:23 PDT 2016


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, samsonov, glider, kcc.
kubabrecka added subscribers: llvm-commits, zaks.anna, dcoughlin.

This is a new version of http://reviews.llvm.org/D18121, which I had to revert due to test failures.  It's not possible to reopen a closed revision here, so I'm creating a new one.

The issue is that TSan unit tests run with a statically linked runtime, where interceptors don't work, but that's fine, we don't need them.  With the patch, this is now detected and the unit tests are aborted.  To avoid this, we have `DisableReexec()`, but due to static initializers order, it's not possible to call this function early enough (we'd have to make more invasive changes).  So I'm proposing a simpler fix, which simply adds a "disable_reexec" flag that is set in unit tests.

http://reviews.llvm.org/D18212

Files:
  lib/sanitizer_common/sanitizer_flags.inc
  lib/sanitizer_common/sanitizer_mac.cc
  lib/tsan/tests/rtl/tsan_test.cc
  lib/tsan/tests/unit/tsan_flags_test.cc
  lib/tsan/tests/unit/tsan_unit_test_main.cc
  test/lit.common.cfg
  test/tsan/Darwin/dlopen.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18212.50827.patch
Type: text/x-patch
Size: 6505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160316/5f13069b/attachment.bin>


More information about the llvm-commits mailing list