[PATCH] [lsan] [mips] adding support of lsan for mips64/mips64el arch

Sergey Matveev earthdok at google.com
Fri Nov 14 07:54:33 PST 2014


================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:248
@@ +247,3 @@
+
+  const uptr kTlsTcbOffset = 0x7000;
+  const uptr kTcbHead = 16;
----------------
kumarsukhani wrote:
> earthdok wrote:
> > Only this constant is part of the ABI. kTcbHead and kTlsTcbAlign could theoretically change, so we need to test them as well.
> > 
> > Instead of ThreadDescriptorSize(), we probably want to expose TlsPreTcbSize(). But please figure out what the test will look like before making this change.
> can we use test of minor number, the way x86_64 has done ?
That's how you guess the size. But you still need a testcase to check that your guess is correct. Take a look at lib/sanitizer_common/tests/sanitizer_linux_test.cc, specifically TEST(SanitizerLinux, ThreadDescriptorSize).

http://reviews.llvm.org/D5616






More information about the llvm-commits mailing list