diff options
author | Reid Kleckner <rnk@google.com> | 2016-08-03 01:19:46 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-08-03 01:19:46 +0000 |
commit | c19a416b07b94551e7a6f9db7b1578b324324c78 (patch) | |
tree | b9f677740d09348897fd565a1c5c4d07fa6eb67d /lib | |
parent | 89a13f837f8bf0941e092ca757f65f65230110aa (diff) |
Reduce coverage PC buffer size on 32-bit Windows to match 32-bit Linux
In r235779, Timur bumped the buffer size up to 1<<27, or about 134
million coverage points, presumably to handle Chrome. We allocate two
arrays of uptrs with this size, and this reliably exhausts all available
address space on 32-bit Windows (2 allocations of 512MB) when ASan is
also enabled.
Let's reduce the buffer size for now to stabilize the test suite. We can
re-evaluate the approach later when we've brought the Chrome ASan
builders back to life.
Kostya said that Mike reduced the number of instrumented coverage points
that LLVM emits by half since Timur made this change, so reducing this
array size should also be safe.
With this change, the 32-bit ASan tests reliably pass for me on Windows
10.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sanitizer_common/sanitizer_coverage_libcdep.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/sanitizer_common/sanitizer_coverage_libcdep.cc b/lib/sanitizer_common/sanitizer_coverage_libcdep.cc index 51b53d345..00872666d 100644 --- a/lib/sanitizer_common/sanitizer_coverage_libcdep.cc +++ b/lib/sanitizer_common/sanitizer_coverage_libcdep.cc @@ -125,9 +125,8 @@ class CoverageData { // Maximal size pc array may ever grow. // We MmapNoReserve this space to ensure that the array is contiguous. - static const uptr kPcArrayMaxSize = FIRST_32_SECOND_64( - 1 << (SANITIZER_ANDROID ? 24 : (SANITIZER_WINDOWS ? 27 : 26)), - 1 << 27); + static const uptr kPcArrayMaxSize = + FIRST_32_SECOND_64(1 << (SANITIZER_ANDROID ? 24 : 26), 1 << 27); // The amount file mapping for the pc array is grown by. static const uptr kPcArrayMmapSize = 64 * 1024; |