[PATCH] D29586: [lsan] Enable LSan for arm Linux

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 12:16:21 PST 2017


zatrazz added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1299
+                       "mov pc, ip\n"
+#endif
+                       /* Call _exit(%r0). */
----------------
I think you could simplify to just:


```
#ifdef ARCH_HAS_BX
# ifdef ARCH_HAS_BLX
#  define BLX(R)        "blx "  #R
# else
#  define BLX(R)        "mov     lr, pc; bx" #R
# endif
#else
# define BLX(R)         "mov     lr, pc; mov pc," #R
#endif
```

And then on inline assembly just call BLX(ip).



================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:247
+  // The sizeof (struct pthread) is valid for GLIBC 2.20.
+  val = 1152;
+  atomic_store(&kThreadDescriptorSize, val, memory_order_relaxed);
----------------
This is not what I am seeing on my environment:

2.25	-	1216
2.24	-	1216
2.23	-	1216
2.22	-	1120
2.21	-	1120
2.20	-	1120

The 2.22 to 2.23 change (cause by 3e2ee6f0e3471ce commit) removed HAVE_FORCED_UNWIND and thus 'struct pthread' adds a 'struct _Unwind_Exception' regardless if architecture defined or not HAVE_FORCED_UNWIND.


Repository:
  rL LLVM

https://reviews.llvm.org/D29586





More information about the llvm-commits mailing list