[PATCH] Implement `internal_start/join_thread` on Mac OS X

Ismail Pazarbasi ismail.pazarbasi at gmail.com
Mon Jun 22 09:52:27 PDT 2015


================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:341
@@ +340,3 @@
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000
+  // Start the thread with signals blocked, otherwise it can steal user signals.
+  __sanitizer_sigset_t set, old;
----------------
glider wrote:
> Looks like you've taken this from sanitizer_linux.cc
> Can you please move this function to sanitizer_posix.cc instead?
I've tried moving this in sanitizer_posix.cc, but it made the code really ugly. It needed `#include`s -- 1 for Linux, and one for Mac. We must move these `#if`s (Mac's target conditionals) and SANITIZER_LINUX -- because one line of code in sanitizer_linux.cc needs to be surrounded with it -- in sanitizer_posix.cc. It also needs declaration of internal_sigfillset, which is missing from sanitizer_posix.cc. If you really want to see it, I can certainly submit it. But IMO, that must be a separate commit, only containing refactored and readable code.

http://reviews.llvm.org/D9638

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list