From 4ed012db1002fb2e8afa716fd17e6ad8912c18bc Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Tue, 2 Aug 2016 22:25:38 +0000 Subject: [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 --- lib/scudo/scudo_allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scudo/scudo_allocator.cpp') 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; }; -- cgit v1.2.3