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

Sergey Matveev earthdok at google.com
Tue Nov 18 06:30:49 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:
> > 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).
> > 
> how to run this tests on x86_64 ?
> I think so this tests doesn't execute when I run 
> ```
> make check-all
> ```
"check-all" includes this testcase. You can verify by adding an invalid assertion to the test - check-all will fail.

The smallest subset that includes this test case is "check-sanitizer"

Note that the test case itself is under #ifdef x86_64/i386

http://reviews.llvm.org/D5616






More information about the llvm-commits mailing list