Changes:
- Add initial msan stub support.
- Handle NetBSD specific pthread_setname_np(3).
- NetBSD supports attribute((tls_model("initial-exec"))), define it in SANITIZER_TLS_INITIAL_EXEC_ATTRIBUTE.
- Add ReExec() specific bits for NetBSD.
- Simplify code and add syscall64 and syscall_ptr for !NetBSD.
- Correct bunch of syscall wrappers for NetBSD.
- Disable test/tsan/map32bit on NetBSD as not applicable.
- Port test/tsan/strerror_r to a POSIX-compliant OSes.
- Disable __libc_stack_end on NetBSD.
- Disable ReadNullSepFileToArray() on NetBSD.
- Define struct_ElfW_Phdr_sz, detected missing symbol by msan.
- Change type of __sanitizer_FILE from void to char. This helps to reuse this type as an array. Long term it will be properly implemented along with SANITIZER_HAS_STRUCT_FILE setting to 1.
- Add initial NetBSD support in lib/tsan/go/buildgo.sh.
- Correct referencing stdout and stderr in tsan_interceptors.cc on NetBSD.
- Document NetBSD x86_64 specific virtual memory layout in tsan_platform.h.
- Port tests/rtl/tsan_test_util_posix.cc to NetBSD.
- Enable NetBSD tests in test/msan/lit.cfg.
- Enable NetBSD tests in test/tsan/lit.cfg.
Sponsored by <The NetBSD Foundation>
Please move everything except "void *ctx" into COMMON_INTERCEPTOR_ENTER scope as all other interceptors do. This reduces chances of actual code appear outside of interceptor scope.