diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/asan/TestCases/strdup_oob_test.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/asan/TestCases/strdup_oob_test.cc b/test/asan/TestCases/strdup_oob_test.cc index a039568b2..dc9eec803 100644 --- a/test/asan/TestCases/strdup_oob_test.cc +++ b/test/asan/TestCases/strdup_oob_test.cc @@ -3,6 +3,9 @@ // RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s +// When built as C on Linux, strdup is transformed to __strdup. +// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s + #include <string.h> char kString[] = "foo"; @@ -14,7 +17,8 @@ int main(int argc, char **argv) { // CHECK: #0 {{.*}}main {{.*}}strdup_oob_test.cc:[[@LINE-2]] // CHECK-LABEL: allocated by thread T{{.*}} here: // CHECK: #{{[01]}} {{.*}}strdup + // CHECK: #{{.*}}main {{.*}}strdup_oob_test.cc:[[@LINE-6]] // CHECK-LABEL: SUMMARY - // CHECK: strdup_oob_test.cc:[[@LINE-6]] + // CHECK: strdup_oob_test.cc:[[@LINE-7]] return x; } |