brintos

brintos / llvm-project-archived public Read only

0
0
Text · 508 B · 9144bd6 Raw
22 lines · cpp
1// RUN: %clangxx_asan %s -o %t && %run %t 2>&1 | FileCheck %s2 3#include <malloc/malloc.h>4#include <stdlib.h>5#include <stdio.h>6 7int main() {8  fprintf(stderr, "start\n");9  malloc_zone_t *zone = malloc_create_zone(0, 0);10  fprintf(stderr, "zone = %p\n", zone);11  malloc_set_zone_name(zone, "myzone");12  fprintf(stderr, "name changed\n");13  malloc_destroy_zone(zone);14  fprintf(stderr, "done\n");15  return 0;16}17 18// CHECK: start19// CHECK-NEXT: zone = 0x{{.*}}20// CHECK-NEXT: name changed21// CHECK-NEXT: done22