Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler-rt/test/asan/TestCases/wcscat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ int main() {
wchar_t badDst[9];
wcscpy(badDst, start);
fprintf(stderr, "Good so far.\n");
// CHECK: Good so far.
// CHECK-DAG: Good so far.
fflush(stderr);
wcscat(badDst, append); // Boom!
// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0
// CHECK: #0 {{0x[0-9a-f]+}} in wcscat
printf("Should have failed with ASAN error.\n");
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/asan/TestCases/wcscpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ int main() {

wchar_t badDst[7];
fprintf(stderr, "Good so far.\n");
// CHECK: Good so far.
// CHECK-DAG: Good so far.
fflush(stderr);
wcscpy(badDst, src); // Boom!
// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0
// CHECK: #0 {{0x[0-9a-f]+}} in wcscpy
printf("Should have failed with ASAN error.\n");
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/asan/TestCases/wcsncat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ int main() {
wcscpy(badDst, start);
wcsncat(badDst, append, 1);
fprintf(stderr, "Good so far.\n");
// CHECK: Good so far.
// CHECK-DAG: Good so far.
fflush(stderr);
wcsncat(badDst, append, 3); // Boom!
// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0
// CHECK: #0 {{0x[0-9a-f]+}} in wcsncat
printf("Should have failed with ASAN error.\n");
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/asan/TestCases/wcsncpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ int main() {
wchar_t badDst[7];
wcsncpy(badDst, src, 7); // This should still work.
fprintf(stderr, "Good so far.\n");
// CHECK: Good so far.
// CHECK-DAG: Good so far.
fflush(stderr);

wcsncpy(badDst, src, 15); // Boom!
// CHECK: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
// CHECK-DAG: ERROR: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] at pc {{0x[0-9a-f]+}} bp {{0x[0-9a-f]+}} sp {{0x[0-9a-f]+}}
// CHECK: WRITE of size {{[0-9]+}} at [[ADDR]] thread T0
// CHECK: #0 {{0x[0-9a-f]+}} in wcsncpy
printf("Should have failed with ASAN error.\n");
Expand Down