[PATCH] D70958: [compiler-rt] [test] Disable ASLR on ASAN/MSAN/TSAN tests on NetBSD

Kamil Rytarowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 18:36:46 PST 2019


krytarowski added a comment.

In D70958#1767912 <https://reviews.llvm.org/D70958#1767912>, @eugenis wrote:

> Could this go into the common lit config in compiler-rt/test?


Do you mean to run this for all tests in compiler-rt? We intend to disable it only when needed and prevent leaking regressions that violate ASLR to other components of LLVM.

> What is the problem with ASLR in NetBSD? Is this about fixed shadow location conflicts with the binary & library mappings?

PaX ASLR on NetBSD is too aggressive with the layout randomization and we cannot predict ranges of the heap and the stack. Next, we cannot map reliably the memory used into shadow buffer that crashes in a cryptic way. We are fine with disabling ASLR for the sanitizers that need shadow buffers and origins.



================
Comment at: compiler-rt/test/sanitizer_common/netbsd_commands/run_noaslr.sh:4
+PATH=${PATH}:/usr/sbin
+paxctl +a "${1}"
+exec "${@}"
----------------
I propose to use `/usr/bin/paxctl` as it will be PATH and environment independent. We already use this direct path approach in pkgsrc.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70958/new/

https://reviews.llvm.org/D70958





More information about the cfe-commits mailing list