[compiler-rt] r274764 - [compiler-rt] Fix AllocatorCacheDeallocNewThread unittest

Etienne Bergeron via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 08:52:29 PDT 2016


Author: etienneb
Date: Thu Jul  7 10:52:28 2016
New Revision: 274764

URL: http://llvm.org/viewvc/llvm-project?rev=274764&view=rev
Log:
[compiler-rt] Fix AllocatorCacheDeallocNewThread unittest

Summary:
The unittest was not freeing the mapped memory.


```
Repeating all tests (iteration 1) . . .

Note: Google Test filter = Allocator.AllocatorCacheDeallocNewThread
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Allocator
[ RUN      ] Allocator.AllocatorCacheDeallocNewThread
[       OK ] Allocator.AllocatorCacheDeallocNewThread (3 ms)
[----------] 1 test from Allocator (4 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (5 ms total)
[  PASSED  ] 1 test.

Repeating all tests (iteration 2) . . .

Note: Google Test filter = Allocator.AllocatorCacheDeallocNewThread
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Allocator
[ RUN      ] Allocator.AllocatorCacheDeallocNewThread
==4504==WARNING: SanitizerTool failed to mprotect 0x010000003000 (1099511640064) bytes at 0x010000000000 (error code: 48
7)
==4504==Sanitizer CHECK failed: D:/src/llvm/llvm/projects/compiler-rt/lib\sanitizer_common/sanitizer_allocator.h:329 ((kSpaceBeg)) == ((reinterpret_cast<uptr>( MmapFixedNoAccess(kSpaceBeg, TotalSpaceSize)))) (1099511627776, 0)
```

Reviewers: rnk

Subscribers: llvm-commits, kubabrecka, chrisha

Differential Revision: http://reviews.llvm.org/D22094

Modified:
    compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc?rev=274764&r1=274763&r2=274764&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc Thu Jul  7 10:52:28 2016
@@ -601,6 +601,8 @@ TEST(Allocator, AllocatorCacheDeallocNew
   pthread_t t;
   PTHREAD_CREATE(&t, 0, DeallocNewThreadWorker, params);
   PTHREAD_JOIN(t, 0);
+
+  allocator.TestOnlyUnmap();
 }
 #endif
 




More information about the llvm-commits mailing list