[asan] make the __asan_get_heap_size more robust

llvm-svn: 177270
This commit is contained in:
Kostya Serebryany 2013-03-18 10:52:25 +00:00
parent 20bf8c7778
commit 9138f75d0a
1 changed files with 1 additions and 0 deletions

View File

@ -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);