Kirill Stoimenov 51e49e12e7 [HWASAN][LSAN] Replace cstdint with stdint.h
Reviewed By: brooksmoses, MaskRay

Differential Revision: https://reviews.llvm.org/D155994
2023-07-21 22:20:12 +00:00

18 lines
378 B
C++

// Checks if a user pointer is found by the leak sanitizer.
// RUN: %clang_lsan %s -o %t
// RUN: %run %t 2>&1
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
uintptr_t glob[1024];
int main() {
for (int i = 0; i < 1024; ++i) {
// Check that the pointers will not be falsely reported as leaks.
glob[i] = (uintptr_t)malloc(sizeof(int *));
}
return 0;
}