diff options
author | Kostya Serebryany <kcc@google.com> | 2016-08-02 22:25:38 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-08-02 22:25:38 +0000 |
commit | 4ed012db1002fb2e8afa716fd17e6ad8912c18bc (patch) | |
tree | 7f179154995c5fe2f3acc82414a93659708fc89b /lib/scudo/scudo_allocator.cpp | |
parent | 62d95f29b00657eb6177fc6ad5c4ec9590457e39 (diff) |
[sanitizer] Implement a __asan_default_options() equivalent for Scudo
Summary:
Currently, the Scudo Hardened Allocator only gets its flags via the SCUDO_OPTIONS environment variable.
With this patch, we offer the opportunity for programs to define their own options via __scudo_default_options() which behaves like __asan_default_options() (weak symbol).
A relevant test has been added as well, and the documentation updated accordingly.
I also used this patch as an opportunity to rename a few variables to comply with the LLVM naming scheme, and replaced a use of Report with dieWithMessage for consistency (and to avoid a callback).
Reviewers: llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D23018
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@277536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo/scudo_allocator.cpp')
-rw-r--r-- | lib/scudo/scudo_allocator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scudo/scudo_allocator.cpp b/lib/scudo/scudo_allocator.cpp index 3ad499aed..ceb7bbdd4 100644 --- a/lib/scudo/scudo_allocator.cpp +++ b/lib/scudo/scudo_allocator.cpp @@ -76,7 +76,7 @@ struct UnpackedHeader { u64 Offset : 20; // Offset from the beginning of the backend // allocation to the beginning chunk itself, in // multiples of MinAlignment. See comment about its - // maximum value and test in Initialize. + // maximum value and test in init(). u64 Unused_1_ : 28; u16 Salt : 16; }; |