Dtor callback emitted when msan attribute not repressed for this function.
Summary: In addition to checking compiler flags, the front-end also examines the attributes of the destructor definition to ensure that the SanitizeMemory attribute is attached. Reviewers: eugenis, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11727 refactored test into new file, revised how function attribute examined modified test to examine default dtor with and without attribute removed attribute check llvm-svn: 243912
This commit is contained in:
@@ -1479,7 +1479,8 @@ void CodeGenFunction::EmitDestructorBody(FunctionArgList &Args) {
|
||||
ExitCXXTryStmt(*cast<CXXTryStmt>(Body), true);
|
||||
|
||||
// Insert memory-poisoning instrumentation.
|
||||
if (CGM.getCodeGenOpts().SanitizeMemoryUseAfterDtor)
|
||||
if (CGM.getCodeGenOpts().SanitizeMemoryUseAfterDtor
|
||||
&& SanOpts.has(SanitizerKind::Memory))
|
||||
EmitDtorSanitizerCallback(*this, Dtor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user