[PATCH] D25026: [asan] Move instrumented null-terminated strings to a special section

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 03:37:07 PDT 2016


If we still have the bug without those flags, I'd rather have a proper
test showing it, which would show why the flags are there.

Thank you,
 Filipe

On Fri, Oct 21, 2016 at 5:25 PM, Kuba Brecka <kuba.brecka at gmail.com> wrote:
> kubabrecka added a comment.
>
> ping
>
>
>
> ================
> Comment at: projects/compiler-rt/test/asan/TestCases/Darwin/odr-lto.cc:6
>
> -// RUN: %clangxx_asan -DPART=0 -c %s -o %t-1.o -flto
> -// RUN: %clangxx_asan -DPART=1 -c %s -o %t-2.o -flto
> -// RUN: %clangxx_asan %t-1.o %t-2.o -o %t -flto
> -// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-ODR
> -
>  // RUN: %clangxx_asan -DPART=0 -c %s -o %t-1.o -flto -mllvm -asan-use-private-alias
>  // RUN: %clangxx_asan -DPART=1 -c %s -o %t-2.o -flto -mllvm -asan-use-private-alias
> ----------------
> filcab wrote:
>> What happened here? There's no error any more? Do we still need to use `-asan-use-private-alias`, etc?
>>
> This tests checks that -asan-use-private-alias fixes a known bug when using LTO+ASan.  Eventually, I wanted to turn -asan-use-private-alias on by default to get rid of this annoying bug causing many false positives.  This patch fixes accidentally also this bug for a lot of cases (when strings are involved), but I believe there are other (less common) instances of the LTO+ASan bug that aren’t fixed.  I would still like to keep the odr-lto.cc testcase, because it tests that -asan-use-private-alias doesn’t regress.  If you want me to, I can try to create a new test that would trigger the LTO+ASan bug.
>
>
> https://reviews.llvm.org/D25026
>
>
>


More information about the llvm-commits mailing list