diff options
author | Kamil Rytarowski <n54@gmx.com> | 2018-06-05 07:29:23 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2018-06-05 07:29:23 +0000 |
commit | 7e2a55c7de9075254f44129e8da9d44107e57194 (patch) | |
tree | e194c7a40723507140e4f274f2afc31273ed57ba /lib/sanitizer_common/sanitizer_common.h | |
parent | 41c195d587ce74bb6a5712486434bca4fcddaaa1 (diff) | |
download | compiler-rt-7e2a55c7de9075254f44129e8da9d44107e57194.tar.gz |
Introduce CheckASLR() in sanitizers
Summary:
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>
Reviewers: vitalybuka, joerg
Reviewed By: vitalybuka
Subscribers: cryptoad, kubamracek, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D47442
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_common.h b/lib/sanitizer_common/sanitizer_common.h index 150c97ea4..4246d2e70 100644 --- a/lib/sanitizer_common/sanitizer_common.h +++ b/lib/sanitizer_common/sanitizer_common.h @@ -221,6 +221,7 @@ bool SetEnv(const char *name, const char *value); u32 GetUid(); void ReExec(); +void CheckASLR(); char **GetArgv(); void PrintCmdline(); bool StackSizeIsUnlimited(); |