diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-01-20 13:12:12 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-01-20 13:12:12 +0000 |
commit | 4bdc60434c79126b75aee2bb391275f3bb746364 (patch) | |
tree | f2931c50070d8b6a1153aae4564d45f112c87acc /lib/Frontend/CompilerInvocation.cpp | |
parent | e6b9d802fb7b16d93474c4f1c179ab36202e8a8b (diff) |
Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 9329b3bc1b..a16b822d23 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -404,8 +404,10 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir); Opts.LinkBitcodeFile = Args.getLastArgValue(OPT_mlink_bitcode_file); Opts.SanitizerBlacklistFile = Args.getLastArgValue(OPT_fsanitize_blacklist); - Opts.MemorySanitizerTrackOrigins = + Opts.SanitizeMemoryTrackOrigins = Args.hasArg(OPT_fsanitize_memory_track_origins); + Opts.SanitizeAddressZeroBaseShadow = + Args.hasArg(OPT_fsanitize_address_zero_base_shadow); Opts.SSPBufferSize = Args.getLastArgIntValue(OPT_stack_protector_buffer_size, 8, Diags); Opts.StackRealignment = Args.hasArg(OPT_mstackrealign); |