1 // RUN: %clangxx_scudo %s -o %t
2 // RUN: not %run %t malloc 2>&1 | FileCheck %s
3 // RUN: not %run %t new 2>&1 | FileCheck %s
4 // RUN: not %run %t newarray 2>&1 | FileCheck %s
6 // Tests double-free error on pointers allocated with different allocation
13 int main(int argc
, char **argv
) {
15 if (!strcmp(argv
[1], "malloc")) {
16 void *p
= malloc(sizeof(int));
21 if (!strcmp(argv
[1], "new")) {
27 if (!strcmp(argv
[1], "newarray")) {
36 // CHECK: ERROR: invalid chunk state