[compiler-rt] 615ecd8 - [HWASan] Move LTO test to separate file.

Adhemerval Zanella via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 25 05:15:54 PST 2021



On 22/11/2021 18:19, Matt Morehouse via llvm-commits wrote:
> 
> Author: Matt Morehouse
> Date: 2021-11-22T13:19:11-08:00
> New Revision: 615ecd8afc43b3ac5aa54053bff26002a0ce7ce6
> 
> URL: https://github.com/llvm/llvm-project/commit/615ecd8afc43b3ac5aa54053bff26002a0ce7ce6
> DIFF: https://github.com/llvm/llvm-project/commit/615ecd8afc43b3ac5aa54053bff26002a0ce7ce6.diff
> 
> LOG: [HWASan] Move LTO test to separate file.
> 
> The test fails on Android for an unknown reason but is still worth
> having for x86.
> 
> Added: 
>     compiler-rt/test/hwasan/TestCases/lto.c
> 
> Modified: 
>     compiler-rt/test/hwasan/TestCases/global.c
> 
> Removed: 
>     
> > 
> ################################################################################
> diff  --git a/compiler-rt/test/hwasan/TestCases/global.c b/compiler-rt/test/hwasan/TestCases/global.c
> index 45413fe48c5b..23fefd0ecceb 100644
> --- a/compiler-rt/test/hwasan/TestCases/global.c
> +++ b/compiler-rt/test/hwasan/TestCases/global.c

This tests is currently failing on aarch64 SVE bots [1] [2].  I haven not
investigate why, do we need to disable it for aarch64 as well?

[1] https://lab.llvm.org/buildbot/#/builders/198/builds/410
[2] https://lab.llvm.org/buildbot/#/builders/176/builds/1090

> @@ -5,10 +5,6 @@
>  // RUN: not %run %t -1 2>&1 | FileCheck --check-prefixes=CHECK,LSYM %s
>  // RUN: not %env_hwasan_opts=symbolize=0 %run %t -1 2>&1 | FileCheck --check-prefixes=CHECK,LNOSYM %s
>  
> -// Test with LTO, since it invokes the integrated assembler separately.
> -// RUN: %clang_hwasan -flto %s -o %t
> -// RUN: not %run %t 1 2>&1 | FileCheck --check-prefixes=CHECK,RSYM %s
> -
>  // Test with and without optimizations, with and without PIC, since 
> diff erent
>  // backend passes run depending on these flags.
>  // RUN: %clang_hwasan -fno-pic %s -o %t
> 
> diff  --git a/compiler-rt/test/hwasan/TestCases/lto.c b/compiler-rt/test/hwasan/TestCases/lto.c
> new file mode 100644
> index 000000000000..6a83a32ff1fb
> --- /dev/null
> +++ b/compiler-rt/test/hwasan/TestCases/lto.c
> @@ -0,0 +1,17 @@
> +// Test globals with LTO, since it invokes the integrated assembler separately.
> +// RUN: %clang_hwasan -flto %s -o %t
> +// RUN: not %run %t 1 2>&1 | FileCheck %s
> +
> +// REQUIRES: pointer-tagging
> +// UNSUPPORTED: android
> +
> +#include <stdlib.h>
> +
> +int x = 1;
> +
> +int main(int argc, char **argv) {
> +  // CHECK: Cause: global-overflow
> +  // CHECK: is located 0 bytes to the right of 4-byte global variable x {{.*}} in {{.*}}lto.c.tmp
> +  // CHECK-NOT: can not describe
> +  (&x)[atoi(argv[1])] = 1;
> +}
> 
> 
>         
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 


More information about the llvm-commits mailing list