[PATCH] D60243: [LSan][AArch64] Speed-up leak and address sanitizers on AArch64 for 47-bit VMA

Brian Rzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 08:56:39 PDT 2019


brzycki added a comment.

Hi @vitalybuka , I am attempting to use D61401 <https://reviews.llvm.org/D61401> as you suggested but have run into an issue regarding `use1` used inside static member functions. This error persists regardless if I attempt to make it a member variable or a global variable:

  /work/b.rzycki/upstream/llvm-project/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_allocator_primary_pair.h:76:9: error: invalid use of member 'use1' in static member function
      if (use1)
          ^~~~
  /work/b.rzycki/upstream/llvm-project/llvm/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_allocator_primary_pair.h:82:9: error: invalid use of member 'use1' in static member function
      if (use1)
          ^~~~

static bool use1 = false;

...

I don't quite understand why `use1` is failing for me as a header, but not for your test case embedded in cc code.  Here's the code that LLVM is unhappy about:

  static bool CanAllocate(uptr size, uptr alignment) {
    if (use1)
      return A1::CanAllocate(size, alignment);
    return A2::CanAllocate(size, alignment);
  }
  
  static uptr ClassID(uptr size) {
    if (use1)
      return A1::ClassID(size);
    return A2::ClassID(size);
  }


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60243/new/

https://reviews.llvm.org/D60243





More information about the llvm-commits mailing list