summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ItaniumCXXABI.cpp
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2018-01-02 13:46:12 +0000
committerFilipe Cabecinhas <me@filcab.net>2018-01-02 13:46:12 +0000
commit6f83fa99347ee220edecec703e90e126d1323b90 (patch)
treef73db7af40ed7d65b3fc93fd313f0395a5138a10 /clang/lib/CodeGen/ItaniumCXXABI.cpp
parentc9b3e1cf039e541dac031bebac0fd075197d5860 (diff)
downloadbcm5719-llvm-6f83fa99347ee220edecec703e90e126d1323b90.tar.gz
bcm5719-llvm-6f83fa99347ee220edecec703e90e126d1323b90.zip
Revert "ASan+operator new[]: Fix operator new[] cookie poisoning"
This reverts r321645. I missed a compiler-rt test that needs updating. llvm-svn: 321647
Diffstat (limited to 'clang/lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/ItaniumCXXABI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp
index bfb18aee2e6..c375b82ea93 100644
--- a/clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/clang/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 =
OpenPOWER on IntegriCloud