[llvm-commits] Fixes to tsan allocator64 (issue 6478053)

kcc at google.com kcc at google.com
Fri Aug 24 01:17:44 PDT 2012


LGTM++
My fault that I left the FIXME unfixed.


http://codereview.appspot.com/6478053/diff/1/sanitizer_common/sanitizer_allocator64.h
File sanitizer_common/sanitizer_allocator64.h (right):

http://codereview.appspot.com/6478053/diff/1/sanitizer_common/sanitizer_allocator64.h#newcode151
sanitizer_common/sanitizer_allocator64.h:151: for (uptr i = 0; i < count
&& !region->free_list.empty(); i++) {
region->free list has a size, so you don't need to empty() on every
iteration.
Also, if region->free_list has less than count chunks we want to
preserve the old behavior.
This can be done in a separate CL if you wish

http://codereview.appspot.com/6478053/diff/1/sanitizer_common/tests/sanitizer_allocator64_test.cc
File sanitizer_common/tests/sanitizer_allocator64_test.cc (right):

http://codereview.appspot.com/6478053/diff/1/sanitizer_common/tests/sanitizer_allocator64_test.cc#newcode31
sanitizer_common/tests/sanitizer_allocator64_test.cc:31:
SCMap::MaxCached(i));
please don't remove the old debug code, just append the new one.

http://codereview.appspot.com/6478053/



More information about the llvm-commits mailing list