diff options
author | Filipe Cabecinhas <me@filcab.net> | 2018-01-02 13:46:12 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2018-01-02 13:46:12 +0000 |
commit | 1a835b5d57da69d0b8a94fbfd631a4c5b6aa0fbe (patch) | |
tree | 1b82ea5bc9fa943c67e6208696da855cd917d3b8 /lib/CodeGen/ItaniumCXXABI.cpp | |
parent | ec6c5b21c037ce75b94ce3e33a4fa563f2bb8f48 (diff) |
Revert "ASan+operator new[]: Fix operator new[] cookie poisoning"
This reverts r321645.
I missed a compiler-rt test that needs updating.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r-- | lib/CodeGen/ItaniumCXXABI.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp index bfb18aee2e..c375b82ea9 100644 --- a/lib/CodeGen/ItaniumCXXABI.cpp +++ b/lib/CodeGen/ItaniumCXXABI.cpp @@ -1847,7 +1847,8 @@ Address ItaniumCXXABI::InitializeArrayCookie(CodeGenFunction &CGF, llvm::Instruction *SI = CGF.Builder.CreateStore(NumElements, NumElementsPtr); // Handle the array cookie specially in ASan. - if (CGM.getLangOpts().Sanitize.has(SanitizerKind::Address) && AS == 0) { + if (CGM.getLangOpts().Sanitize.has(SanitizerKind::Address) && AS == 0 && + expr->getOperatorNew()->isReplaceableGlobalAllocationFunction()) { // The store to the CookiePtr does not need to be instrumented. CGM.getSanitizerMetadata()->disableSanitizerForInstruction(SI); llvm::FunctionType *FTy = |