Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / dlsym_alloc.c
blob4aa87afe47f4ea34cd51d16cb3bb48bfc2f333d8
1 // RUN: %clang -O0 %s -o %t && %run %t
3 // FIXME: investigate why this fails on macos
4 // UNSUPPORTED: darwin
6 #include <stdlib.h>
8 const char *test() __attribute__((disable_sanitizer_instrumentation)) {
9 void *volatile p = malloc(3);
10 p = realloc(p, 7);
11 free(p);
13 p = calloc(3, 7);
14 free(p);
16 free(NULL);
18 return "";
21 const char *__asan_default_options()
22 __attribute__((disable_sanitizer_instrumentation)) {
23 return test();
25 const char *__hwasan_default_options()
26 __attribute__((disable_sanitizer_instrumentation)) {
27 return test();
29 const char *__lsan_default_options()
30 __attribute__((disable_sanitizer_instrumentation)) {
31 return test();
33 const char *__memprof_default_options()
34 __attribute__((disable_sanitizer_instrumentation)) {
35 return test();
37 const char *__msan_default_options()
38 __attribute__((disable_sanitizer_instrumentation)) {
39 return test();
41 const char *__nsan_default_options()
42 __attribute__((disable_sanitizer_instrumentation)) {
43 return test();
45 const char *__rtsan_default_options()
46 __attribute__((disable_sanitizer_instrumentation)) {
47 return test();
49 const char *__tsan_default_options()
50 __attribute__((disable_sanitizer_instrumentation)) {
51 return test();
53 const char *__ubsan_default_options()
54 __attribute__((disable_sanitizer_instrumentation)) {
55 return test();
58 int main(int argc, char **argv) { return 0; }