[compiler-rt] [compiler-rt][sanitizer_common] Increase min user-map/freearray round… (PR #73600)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 13:18:19 PST 2023


PiJoules wrote:

> I guess you just run some subset of scudo tests with asan.
> 
> This change looks safe for the rest

Yeah, sorry I could've described this better. This doesn't have anything to do with scudo. This just helps run asan-instrumented scudo tests on 39-bit vma riscv. The order of operations is:
1. We load a single binary that has all the tests in `compiler-rt/lib/scudo/standalone/tests/`. This binary is asan-instrumented.
2. Before entering main, we setup asan and its allocator.
3. We enter main and run some scudo tests.
4. We reach `SCUDO_TYPED_TEST(ScudoCombinedTest, IsOwned)` which creates the scudo allocator for different target configs.
5. Scudo's primary allocator attempts to mmap an arena, but fails with `SCUDO ERROR: zx_vmar_allocate failed with size 11796480KB (ZX_ERR_NO_RESOURCES)`. This happens because much of the 39-bit vma is already occupied, mainly by the asan-shadow, asan's primary allocator, and individual mmaps done by asan.

Normally, we wouldn't have any programs that run both scudo and asan as the allocators. It just so happens that this particular one tests the allocator while the "default" one is asan's in a small vma.

https://github.com/llvm/llvm-project/pull/73600


More information about the llvm-commits mailing list