]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/encoding: use setarch -R for ASAN builds in readable.sh 67531/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 25 Feb 2026 14:28:09 +0000 (22:28 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 25 Feb 2026 14:47:24 +0000 (22:47 +0800)
commit5b9facb04e30f8d0064dc4c4c1520e2215cfdaa5
tree417376c168c4ebbe447bd1cfd9dc7caf148f50fe
parente851e5ab38b68d841f016dac938a4c824bd156be
test/encoding: use setarch -R for ASAN builds in readable.sh

When running readable.sh with a WITH_ASAN=ON build of ceph-dencoder,
ASAN processes need to find a contiguous 16+ TB shadow memory region
(1/8 of the 128 TB x86-64 user VA space). High ASLR entropy can
fragment the VA space, preventing ASAN from finding a suitable region.

Instead of requiring system-wide vm.mmap_rnd_bits=28 (which weakens
ASLR security for the entire host), wrap ceph-dencoder with 'setarch
$(uname -m) -R' when ASAN is detected. This disables ASLR only for the
specific ceph-dencoder processes, with no system-wide security impact.

Also simplify parallelism logic: extract NPROC calculation into a shared
variable and use it consistently across FreeBSD, Darwin, and Linux.

Reference: https://clang.llvm.org/docs/AddressSanitizer.html

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/test/encoding/readable.sh