summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/scudo/scudo_allocator.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-08-02 22:25:38 +0000
committerKostya Serebryany <kcc@google.com>2016-08-02 22:25:38 +0000
commit707894b09270dc072f734d2a28567db58bc36b34 (patch)
treebf3f73c3a537a22d2dca6dcbfc260992a142ba8c /compiler-rt/lib/scudo/scudo_allocator.cpp
parent979902b3ff9009b5909ae245baf43d15f470e22b (diff)
downloadbcm5719-llvm-707894b09270dc072f734d2a28567db58bc36b34.tar.gz
bcm5719-llvm-707894b09270dc072f734d2a28567db58bc36b34.zip
[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 llvm-svn: 277536
Diffstat (limited to 'compiler-rt/lib/scudo/scudo_allocator.cpp')
-rw-r--r--compiler-rt/lib/scudo/scudo_allocator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/scudo/scudo_allocator.cpp b/compiler-rt/lib/scudo/scudo_allocator.cpp
index 3ad499aed10..ceb7bbdd4d8 100644
--- a/compiler-rt/lib/scudo/scudo_allocator.cpp
+++ b/compiler-rt/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;
};
OpenPOWER on IntegriCloud