You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
448 B

// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <stdio.h>
#include <stdlib.h>
class Logger {
public:
Logger() {
fprintf(stderr, "Logger ctor\n");
}
~Logger() {
fprintf(stderr, "Logger dtor\n");
}
};
Logger logger;
void log_from_atexit() {
fprintf(stderr, "In log_from_atexit\n");
}
int main() {
atexit(log_from_atexit);
}
// CHECK: Logger ctor
// CHECK: In log_from_atexit
// CHECK: Logger dtor