From fb762b27f27c67d00a8c3ab04452ddfb524a53b1 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Thu, 21 Jun 2018 23:22:37 +0000 Subject: Ignore blacklist when generating __cfi_check_fail. Summary: Fixes PR37898. Reviewers: pcc, vlad.tsyrklevich Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48454 llvm-svn: 335305 --- clang/lib/CodeGen/CGExpr.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index c1b30500a7a..12b30936dc2 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -3075,6 +3075,11 @@ void CodeGenFunction::EmitCfiCheckFail() { StartFunction(GlobalDecl(), CGM.getContext().VoidTy, F, FI, Args, SourceLocation()); + // This function should not be affected by blacklist. This function does + // not have a source location, but "src:*" would still apply. Revert any + // changes to SanOpts made in StartFunction. + SanOpts = CGM.getLangOpts().Sanitize; + llvm::Value *Data = EmitLoadOfScalar(GetAddrOfLocalVar(&ArgData), /*Volatile=*/false, CGM.getContext().VoidPtrTy, ArgData.getLocation()); -- cgit v1.2.3