[PATCH] [sanitizer] Change the way GetThreadStackAndTls() obtains the thread descriptor address.

Sergey Matveev earthdok at google.com
Wed May 29 03:05:55 PDT 2013



================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:213
@@ +212,3 @@
+  uptr descr_addr;
+#ifdef __i386__
+  asm("mov %%gs:%c1,%0" : "=r"(descr_addr) : "i"(kThreadSelfOffset));
----------------
Alexander Potapenko wrote:
> What happens if ThreadSelf is compiled on ARM or PPC?
This entire block of code is under ifdef x86_64 | i386, as is the call in GetThreadStackAndTls.


http://llvm-reviews.chandlerc.com/D879

BRANCH
  feat/sanitizer/no-arch-prctl

ARCANIST PROJECT
  compiler-rt



More information about the llvm-commits mailing list