Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2 |
|
#
3d149123 |
| 30-Jul-2024 |
Rainer Orth <ro@gcc.gnu.org> |
[sanitizer_common][test] Always skip select allocator tests on SPARC V9 (#100530)
Two allocator tests `FAIL` on Linux/sparc64:
```
SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommo
[sanitizer_common][test] Always skip select allocator tests on SPARC V9 (#100530)
Two allocator tests `FAIL` on Linux/sparc64:
```
SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon/CombinedAllocator32Compact
SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon/SizeClassAllocator32Iteration
```
The failure mode is the same on Solaris/sparcv9, where those tests are
already disabled since 0f69cbe2694a4740e6db5b99bd81a26746403072.
Therefore, this patch skips them on SPARC in general.
Tested on `sparc64-unknown-linux-gnu` and `sparcv9-sun-solaris2.11`.
show more ...
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8 |
|
#
19bbbcbe |
| 06-Jun-2024 |
Thurston Dang <thurston@google.com> |
[sanitizer_common] Change allocator base in test case for compatibili… (#93234)
…ty with high-entropy ASLR
With high-entropy ASLR (e.g., 32-bits == 16TB), the allocator base of
0x700000000000 (1
[sanitizer_common] Change allocator base in test case for compatibili… (#93234)
…ty with high-entropy ASLR
With high-entropy ASLR (e.g., 32-bits == 16TB), the allocator base of
0x700000000000 (112TB) may collide with the placement of the libraries
(e.g., on Linux, the mmap base could be 128TB - 16TB == 112TB). This
results in a segfault in the test case.
This patch moves the allocator base below the PIE program segment,
inspired by fb77ca05ffb4f8e666878f2f6718a9fb4d686839. As per that patch:
1) we are leaving the old behavior for Apple 2) since ASLR cannot be set
above 32-bits for x86-64 Linux, we expect this new layout to be durable.
Note that this is only changing a test case, not the behavior of
sanitizers. Sanitizers have their own settings for initializing the
allocator base.
Reproducer:
1. ninja check-sanitizer # Just to build the test binary needed below;
no need to actually run the tests here
2. sudo sysctl vm.mmap_rnd_bits=32 # Increase ASLR entropy
3. for f in `seq 1 10000`; do echo $f;
GTEST_FILTER=*SizeClassAllocator64Dense
./projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test
> /tmp/x; if [ $? -ne 0 ]; then cat /tmp/x; fi; done
show more ...
|
Revision tags: llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
dcef5308 |
| 28-Jun-2023 |
Fangrui Song <i@maskray.me> |
sanitizer_allocator_test: guard SpecialSizeClassMap test with !ALLOCATOR64_SMALL_SIZE
This artificial size class map uses a very large kMaxSize (1<<34) which is not suitable for small kAddressSpaceS
sanitizer_allocator_test: guard SpecialSizeClassMap test with !ALLOCATOR64_SMALL_SIZE
This artificial size class map uses a very large kMaxSize (1<<34) which is not suitable for small kAddressSpaceSize systems (aarch64-*-linux-android, riscv64). Exposed by D153664.
show more ...
|
#
96928abb |
| 21-Jun-2023 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] Pass user region into OnMapSecondary
|
#
38dfcf96 |
| 21-Jun-2023 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] Add OnMapSecondary callback
Now it implemented as OnMap everywhere, but in follow up patches we can optimize Asan handler.
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2 |
|
#
1e076927 |
| 18-Apr-2023 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] Clang-format some includes
|
Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
76b7784b |
| 10-Oct-2021 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] Rename ByteMap to Map
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init |
|
#
35ce6633 |
| 14-Jul-2021 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] Simplify MapPackedCounterArrayBuffer
|
#
ed430023 |
| 14-Jul-2021 |
Vitaly Buka <vitalybuka@google.com> |
Revert "[NFC][sanitizer] Simplify MapPackedCounterArrayBuffer"
Does not compile.
This reverts commit 8725b382b0a5ea375252d966bafbace62a21e93b.
|
#
8725b382 |
| 14-Jul-2021 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] Simplify MapPackedCounterArrayBuffer
|
#
7140382b |
| 13-Jul-2021 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] Move MemoryMapper template parameter
|
#
99aebb62 |
| 13-Jul-2021 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] Don't store region_base_ in MemoryMapper
Part of D105778
|
#
d558bfaf |
| 13-Jul-2021 |
Vitaly Buka <vitalybuka@google.com> |
[NFC][sanitizer] clang-format part of D105778
|
#
ba8dcaef |
| 13-Jul-2021 |
Vitaly Buka <vitalybuka@google.com> |
Revert "sanitizer_common: optimize memory drain"
Breaks https://lab.llvm.org/buildbot/#/builders/anitizer-windows
This reverts commit d89d3dfae17d7795dc1ef013db66272020de1959.
|
#
d89d3dfa |
| 11-Jul-2021 |
Dmitry Vyukov <dvyukov@google.com> |
sanitizer_common: optimize memory drain
Currently we allocate MemoryMapper per size class. MemoryMapper mmap's and munmap's internal buffer. This results in 50 mmap/munmap calls under the global all
sanitizer_common: optimize memory drain
Currently we allocate MemoryMapper per size class. MemoryMapper mmap's and munmap's internal buffer. This results in 50 mmap/munmap calls under the global allocator mutex. Reuse MemoryMapper and the buffer for all size classes. This radically reduces number of mmap/munmap calls. Smaller size classes tend to have more objects allocated, so it's highly likely that the buffer allocated for the first size class will be enough for all subsequent size classes.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D105778
show more ...
|
#
97661b86 |
| 12-Jul-2021 |
Nikita Popov <nikita.ppv@gmail.com> |
Revert "sanitizer_common: optimize memory drain"
This reverts commit 072669521456a369409cf9db30739a3fac740173.
This causes the following build failure with gcc 10.3.0:
/home/nikic/llvm-project/com
Revert "sanitizer_common: optimize memory drain"
This reverts commit 072669521456a369409cf9db30739a3fac740173.
This causes the following build failure with gcc 10.3.0:
/home/nikic/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h:114:31: error: declaration of ‘typedef class __sanitizer::MemoryMapper<__sanitizer::SizeClassAllocator64<Params> > __sanitizer::SizeClassAllocator64<Params>::MemoryMapper’ changes meaning of ‘MemoryMapper’ [-fpermissive] 114 | typedef MemoryMapper<ThisT> MemoryMapper;
show more ...
|
#
07266952 |
| 11-Jul-2021 |
Dmitry Vyukov <dvyukov@google.com> |
sanitizer_common: optimize memory drain
Currently we allocate MemoryMapper per size class. MemoryMapper mmap's and munmap's internal buffer. This results in 50 mmap/munmap calls under the global all
sanitizer_common: optimize memory drain
Currently we allocate MemoryMapper per size class. MemoryMapper mmap's and munmap's internal buffer. This results in 50 mmap/munmap calls under the global allocator mutex. Reuse MemoryMapper and the buffer for all size classes. This radically reduces number of mmap/munmap calls. Smaller size classes tend to have more objects allocated, so it's highly likely that the buffer allocated for the first size class will be enough for all subsequent size classes.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D105778
show more ...
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
#
eb4967c8 |
| 30-Mar-2021 |
Luís Marques <luismarques@lowrisc.org> |
[Sanitizer][RISCV][AArch64][Android] Adjust allocator tests
On 64-bit systems with small VMAs (e.g. 39-bit) we can't use SizeClassAllocator64 parameterized with size class maps containing a large nu
[Sanitizer][RISCV][AArch64][Android] Adjust allocator tests
On 64-bit systems with small VMAs (e.g. 39-bit) we can't use SizeClassAllocator64 parameterized with size class maps containing a large number of classes, as that will make the allocator region size too small (< 2^32). Several tests were already disabled for Android because of this.
This patch provides the correct allocator configuration for RISC-V (riscv64), generalizes the gating condition for tests that can't be enabled for small VMA systems, and tweaks the tests that can be made compatible with those systems to enable them.
I think the previous gating on Android should instead be AArch64+Android, so the patch reflects that.
Differential Revision: https://reviews.llvm.org/D97234
show more ...
|
#
642b8001 |
| 23-Mar-2021 |
Matt Morehouse <mascasa@google.com> |
[sanitizer] Support dynamic premapped R/W range in primary allocator.
The main use case for this change is HWASan aliasing mode, which premaps the alias space adjacent to the dynamic shadow. With t
[sanitizer] Support dynamic premapped R/W range in primary allocator.
The main use case for this change is HWASan aliasing mode, which premaps the alias space adjacent to the dynamic shadow. With this change, the primary allocator can allocate from the alias space instead of a separate region.
Reviewed By: vitalybuka, eugenis
Differential Revision: https://reviews.llvm.org/D98293
show more ...
|
#
1e9c9092 |
| 23-Mar-2021 |
Vitaly Buka <vitalybuka@google.com> |
Revert "[sanitizer] Support dynamic premapped R/W range in primary allocator."
Fails on Windows https://lab.llvm.org/buildbot/#/builders/127/builds/7999 and Android https://lab.llvm.org/buildbot/#/b
Revert "[sanitizer] Support dynamic premapped R/W range in primary allocator."
Fails on Windows https://lab.llvm.org/buildbot/#/builders/127/builds/7999 and Android https://lab.llvm.org/buildbot/#/builders/77/builds/4839
This reverts commit bca0cf768b6021124f5e5315be333c2f45f14fca.
show more ...
|
Revision tags: llvmorg-12.0.0-rc3 |
|
#
bca0cf76 |
| 05-Mar-2021 |
Matt Morehouse <mascasa@google.com> |
[sanitizer] Support dynamic premapped R/W range in primary allocator.
The main use case for this change is HWASan aliasing mode, which premaps the alias space adjacent to the dynamic shadow. With t
[sanitizer] Support dynamic premapped R/W range in primary allocator.
The main use case for this change is HWASan aliasing mode, which premaps the alias space adjacent to the dynamic shadow. With this change, the primary allocator can allocate from the alias space instead of a separate region.
Reviewed By: vitalybuka, eugenis
Differential Revision: https://reviews.llvm.org/D98293
show more ...
|
#
a149812d |
| 15-Mar-2021 |
Luís Marques <luismarques@lowrisc.org> |
Revert "[Sanitizer][RISCV][AArch64][Android] Adjust allocator tests"
This reverts commit a00347b56e36b30b26f9e54e947b965acf2b7eec due to a test failure on the `sanitizer-x86_64-linux-android` buildb
Revert "[Sanitizer][RISCV][AArch64][Android] Adjust allocator tests"
This reverts commit a00347b56e36b30b26f9e54e947b965acf2b7eec due to a test failure on the `sanitizer-x86_64-linux-android` buildbot.
show more ...
|
#
a00347b5 |
| 15-Mar-2021 |
Luís Marques <luismarques@lowrisc.org> |
[Sanitizer][RISCV][AArch64][Android] Adjust allocator tests
On 64-bit systems with small VMAs (e.g. 39-bit) we can't use `SizeClassAllocator64` parameterized with size class maps containing a large
[Sanitizer][RISCV][AArch64][Android] Adjust allocator tests
On 64-bit systems with small VMAs (e.g. 39-bit) we can't use `SizeClassAllocator64` parameterized with size class maps containing a large number of classes, as that will make the allocator region size too small (< 2^32). Several tests were already disabled for Android because of this.
This patch provides the correct allocator configuration for RISC-V (riscv64), generalizes the gating condition for tests that can't be enabled for small VMA systems, and tweaks the tests that can be made compatible with those systems to enable them.
Differential Revision: https://reviews.llvm.org/D97234
show more ...
|
#
812a9061 |
| 26-Feb-2021 |
Vitaly Buka <vitalybuka@google.com> |
[sanitizers][NFC] Change typesto avoid warnings
Warning was enabled by D94640
|
Revision tags: llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
#
0f69cbe2 |
| 20-Nov-2020 |
Rainer Orth <ro@gcc.gnu.org> |
[sanitizer_common][test] Disable CombinedAllocator32Compact etc. on Solaris/sparcv9
As reported in PR 48202, two allocator tests `FAIL` on Solaris/sparcv9, presumably because Solaris uses the full 6
[sanitizer_common][test] Disable CombinedAllocator32Compact etc. on Solaris/sparcv9
As reported in PR 48202, two allocator tests `FAIL` on Solaris/sparcv9, presumably because Solaris uses the full 64-bit address space and the allocator cannot deal with that:
SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon.CombinedAllocator32Compact SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon.SizeClassAllocator32Iteration
This patch disables the tests.
Tested on `sparcv9-sun-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D91622
show more ...
|