[PATCH] [ASan][MIPS] Fix some tests failing on MIPS64

Sagar Thakur Sagar.Thakur at imgtec.com
Fri Apr 24 02:57:12 PDT 2015


Hi dsanders, kcc, samsonov,

Tests fixed:

AddressSanitizer-mips64-linux :: TestCases/null_deref.cc: symbol for pc was wrong.
AddressSanitizer-mips64-linux :: TestCases/Linux/quarantine_size_mb.cc : The flag quarantine_size_mb should not be compared for >=0 as it is defined as u32 type.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9246

Files:
  lib/asan/asan_flags.cc
  lib/sanitizer_common/sanitizer_linux.cc

Index: lib/asan/asan_flags.cc
===================================================================
--- lib/asan/asan_flags.cc
+++ lib/asan/asan_flags.cc
@@ -154,7 +154,7 @@
 
   // quarantine_size is deprecated but we still honor it.
   // quarantine_size can not be used together with quarantine_size_mb.
-  if (f->quarantine_size >= 0 && f->quarantine_size_mb >= 0) {
+  if (f->quarantine_size >= 0 && f->quarantine_size_mb != u32(-1)) {
     Report("%s: please use either 'quarantine_size' (deprecated) or "
            "quarantine_size_mb, but not both\n", SanitizerToolName);
     Die();
Index: lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_linux.cc
+++ lib/sanitizer_common/sanitizer_linux.cc
@@ -998,7 +998,7 @@
 # endif
 #elif defined(__mips__)
   ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.gregs[31];
+  *pc = ucontext->uc_mcontext.pc;
   *bp = ucontext->uc_mcontext.gregs[30];
   *sp = ucontext->uc_mcontext.gregs[29];
 #else

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9246.24368.patch
Type: text/x-patch
Size: 1065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150424/d03fc193/attachment.bin>


More information about the llvm-commits mailing list