[PATCH] D40105: Implement GetTls() for NetBSD
    Kamil Rytarowski via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Nov 16 17:40:57 PST 2017
    
    
  
krytarowski added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:319
 
-#if SANITIZER_FREEBSD
+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
 static void **ThreadSelfSegbase() {
----------------
joerg wrote:
> Please follow ld.elf_so/tls.c here and use _lwp_setprivate/_lwp_settcb for consistent behavior across all platforms.
D40159
================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:355
 # endif
-#elif SANITIZER_FREEBSD
+#elif SANITIZER_FREEBSD || SANITIZER_NETBSD
   void** segbase = ThreadSelfSegbase();
----------------
joerg wrote:
> It would be better to use struct tls_tcb from sys/tls.h here, avoids having to distinguish variant I and variant II.
D40159
Repository:
  rL LLVM
https://reviews.llvm.org/D40105
    
    
More information about the llvm-commits
mailing list