repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
compiler-rt
/
test
/
gwp_asan
/
double_deletea.cpp
blob
467d5ec330adc0d304892d8dc0a335d6a618b738
1
// REQUIRES: gwp_asan
2
// RUN: %clangxx_gwp_asan %s -o %t
3
// RUN: %expect_crash %run %t 2>&1 | FileCheck %s
4
5
// CHECK: GWP-ASan detected a memory error
6
// CHECK: Double Free at 0x{{[a-f0-9]+}} (a 50-byte allocation)
7
8
#include <cstdlib>
9
10
int
main
() {
11
char
*
Ptr
=
new
char
[
50
];
12
delete
[]
Ptr
;
13
delete
[]
Ptr
;
14
return
0
;
15
}