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

Evgeniy Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 17:12:39 PDT 2017


eugenis added a comment.

Going back to the issue with __interceptor_malloc not saving FP when built with GCC. In clang a function using __builtin_frame_address(0) automatically gets a proper frame pointer. As far as I can see, arm-gcc in the android ndk (version 4.9) behaves the same way on a simple test case. Is that some new optimization where a frame address is computed on the fly?



================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:202
     int minor = internal_simple_strtoll(buf + 8, &end, 10);
-    if (end != buf + 8 && (*end == '\0' || *end == '.')) {
+    if (end != buf + 8 && (*end == '\0' || *end == '.' || *end == '-')) {
       int patch = 0;
----------------
ygribov wrote:
> m.ostapenko wrote:
> > I don't really like this change . Perhaps we can create some white list of terminator symbols, or just drop the check?
> Or just !isalpha(*end)?
what exactly are we trying to avoid here? Something like 1.2abc ?
This is where is comes from: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60038


================
Comment at: test/lsan/TestCases/swapcontext.cc:28
 int main(int argc, char *argv[]) {
-  char stack_memory[kStackSize + 1];
+  char stack_memory[kStackSize + 1] __attribute__((aligned(4)));
   char *heap_memory = new char[kStackSize + 1];
----------------
should it not be 16 for x86_64?


Repository:
  rL LLVM

https://reviews.llvm.org/D29586





More information about the llvm-commits mailing list