[PATCH] D40159: Make TLS/NetBSD handling more generic

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 12:35:29 PST 2017


krytarowski added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:347
+# else
+#  error "unsupported CPU arch"
+# endif
----------------
joerg wrote:
> The fallback is just using _lwp_getprivate() directly. No need to error out.
I wanted to stop rotting and don't fallback to `else` when there is no included `<sys/tls.h>`.. however it would fail anyway. I will adjust it. I think I will also rename `ThreadSelfSegbase()` to `ThreadSelfTLS()`


================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:404
+# endif
+  }
 #elif SANITIZER_ANDROID
----------------
joerg wrote:
> What is this code trying to do in first place? It doesn't really make sense to me. Handling variant I and II differently doesn't make sense either.
Retrieve allocated TLS vector, address and size. How to handle it differently? How to add Variant I support? Is there a way to use a generic solution for both Variations?


Repository:
  rL LLVM

https://reviews.llvm.org/D40159





More information about the llvm-commits mailing list