1 // RUN: %clangxx -fsanitize=undefined -shared-libsan %s -o %t && %run %t 2>&1 | FileCheck %s
3 // Ensure ubsan runtime/interceptors are lazily initialized if called early.
5 // The test seems to segfault on aarch64 with tsan:
6 // https://lab.llvm.org/buildbot/#/builders/179/builds/6662
7 // Reason unknown, needs debugging.
8 // UNSUPPORTED: target=aarch64{{.*}} && ubsan-tsan
14 __attribute__((constructor(1))) void ctor() {
15 fprintf(stderr
, "INIT\n");
17 assert(!sigaction(SIGSEGV
, nullptr, &old
));
21 fprintf(stderr
, "DONE\n");