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:
20bf8c7
)
[asan] make the __asan_get_heap_size more robust
author
Kostya Serebryany
<kcc@google.com>
Mon, 18 Mar 2013 10:52:25 +0000
(10:52 +0000)
committer
Kostya Serebryany
<kcc@google.com>
Mon, 18 Mar 2013 10:52:25 +0000
(10:52 +0000)
llvm-svn: 177270
compiler-rt/lib/asan/tests/asan_noinst_test.cc
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/asan/tests/asan_noinst_test.cc
b/compiler-rt/lib/asan/tests/asan_noinst_test.cc
index
1be41db
..
1681842
100644
(file)
--- a/
compiler-rt/lib/asan/tests/asan_noinst_test.cc
+++ b/
compiler-rt/lib/asan/tests/asan_noinst_test.cc
@@
-464,6
+464,7
@@
TEST(AddressSanitizerInterface, GetHeapSizeTest) {
// The chunk should be greater than the quarantine size,
// otherwise it will be stuck in quarantine instead of being unmaped.
static const size_t kLargeMallocSize = (1 << 28) + 1; // 256M
+ free(Ident(malloc(kLargeMallocSize))); // Drain quarantine.
uptr old_heap_size = __asan_get_heap_size();
for (int i = 0; i < 3; i++) {
// fprintf(stderr, "allocating %zu bytes:\n", kLargeMallocSize);