brintos

brintos / llvm-project-archived public Read only

0
0
Text · 378 B · 827a09c Raw
18 lines · cpp
1// Checks if a user pointer is found by the leak sanitizer.2// RUN: %clang_lsan %s -o %t3// RUN: %run %t 2>&14 5#include <stdint.h>6#include <stdio.h>7#include <stdlib.h>8 9uintptr_t glob[1024];10 11int main() {12  for (int i = 0; i < 1024; ++i) {13    // Check that the pointers will not be falsely reported as leaks.14    glob[i] = (uintptr_t)malloc(sizeof(int *));15  }16  return 0;17}18