diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-07-10 20:07:16 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-07-10 20:07:16 +0000 |
commit | 45be9e0d24e1c04d1f3acab22c83a0e4374a6b93 (patch) | |
tree | 191d67e26265aa6e02257a86c0653625cc356e1d /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 959e0542b8efcb4826e2e616cdadf4c0483080bb (diff) | |
download | llvm-45be9e0d24e1c04d1f3acab22c83a0e4374a6b93.zip llvm-45be9e0d24e1c04d1f3acab22c83a0e4374a6b93.tar.gz llvm-45be9e0d24e1c04d1f3acab22c83a0e4374a6b93.tar.bz2 |
Add an experimental flag -fsanitize-memory-use-after-dtor.
This flag will enable detection of use-after-destructor (but before
memory deallocation) bugs. No actual functionality yet.
https://code.google.com/p/address-sanitizer/issues/detail?id=73
Patch by Naomi Musgrave.
llvm-svn: 241935
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 49823be..baee119 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -557,6 +557,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Args.hasArg(OPT_fsanitize_coverage_8bit_counters); Opts.SanitizeMemoryTrackOrigins = getLastArgIntValue(Args, OPT_fsanitize_memory_track_origins_EQ, 0, Diags); + Opts.SanitizeMemoryUseAfterDtor = + Args.hasArg(OPT_fsanitize_memory_use_after_dtor); Opts.SSPBufferSize = getLastArgIntValue(Args, OPT_stack_protector_buffer_size, 8, Diags); Opts.StackRealignment = Args.hasArg(OPT_mstackrealign); |