Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 5b7b249

Browse files
committed
[tsan] fix the include path that is broken in configure/make build but works in cmake build (PR18144). This is a quick fix. Will need to fix the configure/make build properly
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@196490 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent fc738cb commit 5b7b249

File tree

4 files changed

+21
-22
lines changed

4 files changed

+21
-22
lines changed

lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ int main(int argc, char **argv) {
4747
RecuriveFunctionWithStackFrame<1024>(10);
4848
stale_stack[100]++;
4949
// CHECK: ERROR: AddressSanitizer: stack-use-after-return on address
50-
// CHECK: is located in stack of thread T0 at offset 132 in frame
50+
// CHECK: is located in stack of thread T0 at offset {{116|132}} in frame
5151
// CHECK: in LeakStack(){{.*}}heavy_uar_test.cc:
52-
// CHECK: [32, 1056) 'x'
52+
// CHECK: [{{16|32}}, {{1040|1056}}) 'x'
5353
return 0;
5454
}

lib/asan/lit_tests/TestCases/stack-buffer-overflow-with-position.cc

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
// RUN: %t 8
66
// RUN: not %t 9 2>&1 | FileCheck --check-prefix=CHECK-9 %s
77
// RUN: not %t 10 2>&1 | FileCheck --check-prefix=CHECK-10 %s
8+
// RUN: not %t 30 2>&1 | FileCheck --check-prefix=CHECK-30 %s
9+
// RUN: not %t 31 2>&1 | FileCheck --check-prefix=CHECK-31 %s
10+
// RUN: not %t 41 2>&1 | FileCheck --check-prefix=CHECK-41 %s
11+
// RUN: not %t 42 2>&1 | FileCheck --check-prefix=CHECK-42 %s
812
// RUN: not %t 62 2>&1 | FileCheck --check-prefix=CHECK-62 %s
913
// RUN: not %t 63 2>&1 | FileCheck --check-prefix=CHECK-63 %s
10-
// RUN: not %t 63 2>&1 | FileCheck --check-prefix=CHECK-63 %s
1114
// RUN: not %t 73 2>&1 | FileCheck --check-prefix=CHECK-73 %s
1215
// RUN: not %t 74 2>&1 | FileCheck --check-prefix=CHECK-74 %s
13-
// RUN: not %t 126 2>&1 | FileCheck --check-prefix=CHECK-126 %s
14-
// RUN: not %t 127 2>&1 | FileCheck --check-prefix=CHECK-127 %s
15-
// RUN: not %t 137 2>&1 | FileCheck --check-prefix=CHECK-137 %s
16-
// RUN: not %t 138 2>&1 | FileCheck --check-prefix=CHECK-138 %s
1716
#include <string.h>
1817
#include <stdio.h>
1918
#include <stdlib.h>
@@ -31,15 +30,15 @@ int main(int argc, char **argv) {
3130
// make sure BBB and CCC are not removed;
3231
return *(short*)(p) + BBB[argc % 2] + CCC[argc % 2];
3332
}
34-
// CHECK-m2: 'AAA' <== Memory access at offset 30 underflows this variable
35-
// CHECK-m1: 'AAA' <== Memory access at offset 31 partially underflows this variable
36-
// CHECK-9: 'AAA' <== Memory access at offset 41 partially overflows this variable
37-
// CHECK-10: 'AAA' <== Memory access at offset 42 overflows this variable
38-
// CHECK-62: 'BBB' <== Memory access at offset 94 underflows this variable
39-
// CHECK-63: 'BBB' <== Memory access at offset 95 partially underflows this variable
40-
// CHECK-73: 'BBB' <== Memory access at offset 105 partially overflows this variable
41-
// CHECK-74: 'BBB' <== Memory access at offset 106 overflows this variable
42-
// CHECK-126: 'CCC' <== Memory access at offset 158 underflows this variable
43-
// CHECK-127: 'CCC' <== Memory access at offset 159 partially underflows this variable
44-
// CHECK-137: 'CCC' <== Memory access at offset 169 partially overflows this variable
45-
// CHECK-138: 'CCC' <== Memory access at offset 170 overflows this variable
33+
// CHECK-m2: 'AAA' <== {{.*}}underflows this variable
34+
// CHECK-m1: 'AAA' <== {{.*}}partially underflows this variable
35+
// CHECK-9: 'AAA' <== {{.*}}partially overflows this variable
36+
// CHECK-10: 'AAA' <== {{.*}}overflows this variable
37+
// CHECK-30: 'BBB' <== {{.*}}underflows this variable
38+
// CHECK-31: 'BBB' <== {{.*}}partially underflows this variable
39+
// CHECK-41: 'BBB' <== {{.*}}partially overflows this variable
40+
// CHECK-42: 'BBB' <== {{.*}}overflows this variable
41+
// CHECK-62: 'CCC' <== {{.*}}underflows this variable
42+
// CHECK-63: 'CCC' <== {{.*}}partially underflows this variable
43+
// CHECK-73: 'CCC' <== {{.*}}partially overflows this variable
44+
// CHECK-74: 'CCC' <== {{.*}}overflows this variable

lib/asan/lit_tests/TestCases/stack-use-after-return.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ void Func2(char *x) {
5151
// CHECK: WRITE of size 1 {{.*}} thread T0
5252
// CHECK: #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-2]]
5353
// CHECK: is located in stack of thread T0 at offset
54-
// CHECK: 'local' <== Memory access at offset 32 is inside this variable
54+
// CHECK: 'local' <== Memory access at offset {{16|32}} is inside this variable
5555
// THREAD: WRITE of size 1 {{.*}} thread T{{[1-9]}}
5656
// THREAD: #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-6]]
5757
// THREAD: is located in stack of thread T{{[1-9]}} at offset
58-
// THREAD: 'local' <== Memory access at offset 32 is inside this variable
58+
// THREAD: 'local' <== Memory access at offset {{16|32}} is inside this variable
5959
// CHECK-20: T0: FakeStack created:{{.*}} stack_size_log: 20
6060
// CHECK-24: T0: FakeStack created:{{.*}} stack_size_log: 24
6161
}

lib/tsan/rtl/tsan_rtl_amd64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "sanitizer_common/sanitizer_asm.h"
1+
#include "../../sanitizer_common/sanitizer_asm.h"
22
.section .text
33

44
.hidden __tsan_trace_switch

0 commit comments

Comments
 (0)