brintos

brintos / llvm-project-archived public Read only

0
0
Text · 258 B · d4ce475 Raw
14 lines · c
1// RUN: %clang_lsan %s -o %t2// RUN: %run %t3 4#include <assert.h>5#include <stdlib.h>6 7int main() {8  char *p = malloc(1);9  // The behavior of realloc(p, 0) is implementation-defined.10  // We free the allocation.11  assert(realloc(p, 0) == NULL);12  p = 0;13}14