projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e25a86b
)
[ASan] Fix leaks in ASan tests found by LSan
author
Alexey Samsonov
<samsonov@google.com>
Thu, 18 Jul 2013 12:59:52 +0000
(12:59 +0000)
committer
Alexey Samsonov
<samsonov@google.com>
Thu, 18 Jul 2013 12:59:52 +0000
(12:59 +0000)
llvm-svn: 186577
compiler-rt/lib/asan/tests/asan_test.cc
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/asan/tests/asan_test.cc
b/compiler-rt/lib/asan/tests/asan_test.cc
index
9bb474d
..
c87e6da
100644
(file)
--- a/
compiler-rt/lib/asan/tests/asan_test.cc
+++ b/
compiler-rt/lib/asan/tests/asan_test.cc
@@
-373,6
+373,7
@@
TEST(AddressSanitizer, ReallocFreedPointerTest) {
TEST(AddressSanitizer, ReallocInvalidPointerTest) {
void *ptr = Ident(malloc(42));
EXPECT_DEATH(ptr = realloc((int*)ptr + 1, 77), "attempting free.*not malloc");
+ free(ptr);
}
TEST(AddressSanitizer, ZeroSizeMallocTest) {
@@
-411,6
+412,7
@@
TEST(AddressSanitizer, MallocUsableSizeTest) {
kMallocUsableSizeErrorMsg);
free(array);
EXPECT_DEATH(malloc_usable_size(array), kMallocUsableSizeErrorMsg);
+ delete int_ptr;
}
#endif