[ASan][Test] Fix expected strings for globals test

The expected strings would previously not catch bugs when redzones were
added when they were not actually expected. Fix by adding "global "
before the type.
This commit is contained in:
Marco Elver 2020-06-10 20:20:23 +02:00
parent 1f567b2c6f
commit 52cae05e08
2 changed files with 6 additions and 6 deletions

View File

@ -7,8 +7,8 @@ int global; // to genera
int aliased_global; // KASAN - ignore globals prefixed by aliases with __-prefix (below)
extern int __attribute__((alias("aliased_global"))) __global_alias; // KASAN - aliased_global ignored
// ASAN: @aliased_global{{.*}}{ i32, [60 x i8] }{{.*}}align 32
// KASAN: @aliased_global{{.*}}i32
// ASAN: @aliased_global{{.*}} global { i32, [60 x i8] }{{.*}}, align 32
// KASAN: @aliased_global{{.*}} global i32
// CHECK-LABEL: define internal void @asan.module_ctor
// ASAN: call void @__asan_register_globals({{.*}}, i{{32|64}} 2)

View File

@ -22,10 +22,10 @@ void func() {
const char *literal = "Hello, world!";
}
// ASAN: sectioned_global{{.*}}{ i32, [60 x i8] }{{.*}}align 32
// KASAN: sectioned_global{{.*}}i32
// ASAN: @__special_global{{.*}}{ i32, [60 x i8] }{{.*}}align 32
// KASAN: @__special_global{{.*}}i32
// ASAN: sectioned_global{{.*}} global { i32, [60 x i8] }{{.*}}, align 32
// KASAN: sectioned_global{{.*}} global i32
// ASAN: @__special_global{{.*}} global { i32, [60 x i8] }{{.*}}, align 32
// KASAN: @__special_global{{.*}} global i32
// CHECK-LABEL: define internal void @asan.module_ctor
// ASAN-NEXT: call void @__asan_init