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.
17 lines
341 B
17 lines
341 B
7 months ago
|
// Check that LSan annotations work fine.
|
||
|
// RUN: %clangxx_asan -O0 %s -o %t && %run %t
|
||
|
// RUN: %clangxx_asan -O3 %s -o %t && %run %t
|
||
|
|
||
|
#include <sanitizer/lsan_interface.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main() {
|
||
|
int *x = new int;
|
||
|
__lsan_ignore_object(x);
|
||
|
{
|
||
|
__lsan::ScopedDisabler disabler;
|
||
|
double *y = new double;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|