Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

18 lines
529 B
C

// Test that AddressSanitizer moves constant strings into a separate section.
// RUN: %clang_asan -c -o %t %s
// RUN: llvm-objdump -s %t | FileCheck %s
// Check that "Hello.\n" is in __asan_cstring and not in __cstring.
// CHECK: Contents of section __asan_cstring:
// CHECK: 48656c6c {{.*}} Hello.
// CHECK: Contents of section __const:
// CHECK-NOT: 48656c6c {{.*}} Hello.
// CHECK: Contents of section __cstring:
// CHECK-NOT: 48656c6c {{.*}} Hello.
int main(int argc, char *argv[]) {
argv[0] = "Hello.\n";
return 0;
}