[PATCH] D47442: Introduce CheckASLR() in sanitizers

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 28 00:37:26 PDT 2018


krytarowski created this revision.
krytarowski added reviewers: vitalybuka, joerg.
krytarowski added a project: Sanitizers.
Herald added subscribers: llvm-commits, kubamracek.

At least the ASan, MSan, TSan sanitizers require disabled ASLR on a NetBSD.

Introduce a generic CheckASLR() routine, that implements a check for the
current process. This flag depends on the global or per-process settings.

There is no simple way to disable ASLR in the build process from the
level of a sanitizer or during the runtime execution.

With ASLR enabled sanitizers that operate over the process virtual address
space can misbehave usually breaking with cryptic messages.

This check is dummy for !NetBSD.

Sponsored by <The NetBSD Foundation>


Repository:
  rL LLVM

https://reviews.llvm.org/D47442

Files:
  lib/asan/asan_rtl.cc
  lib/msan/msan.cc
  lib/sanitizer_common/sanitizer_common.h
  lib/sanitizer_common/sanitizer_fuchsia.cc
  lib/sanitizer_common/sanitizer_linux.cc
  lib/sanitizer_common/sanitizer_mac.cc
  lib/sanitizer_common/sanitizer_win.cc
  lib/tsan/rtl/tsan_rtl.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47442.148781.patch
Type: text/x-patch
Size: 3440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180528/d53de21c/attachment.bin>


More information about the llvm-commits mailing list