summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-11-02 17:59:27 +0000
committerDale Johannesen <dalej@apple.com>2010-11-02 17:59:27 +0000
commite81d45d2cc4ecd230f21eff9986c4cfc49c2adb1 (patch)
treeabede91c9d6ca844526f99c138f0df3be81049b8
parent93a4d44ee6eda9d0b864bb54cd0e1604e323c16b (diff)
downloadbcm5719-llvm-e81d45d2cc4ecd230f21eff9986c4cfc49c2adb1.tar.gz
bcm5719-llvm-e81d45d2cc4ecd230f21eff9986c4cfc49c2adb1.zip
Apply patch for use-after-free in InlineAsm constant handling,
PR 8522 / 8616046. Test reduction, analysis and patch by Tim Deegan! (However, review by someone who understands the classes here better is welcome. John Krum will return!) llvm-svn: 118030
-rw-r--r--llvm/lib/VMCore/InlineAsm.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/InlineAsm.cpp b/llvm/lib/VMCore/InlineAsm.cpp
index d951a29f43c..e4f99f09a5c 100644
--- a/llvm/lib/VMCore/InlineAsm.cpp
+++ b/llvm/lib/VMCore/InlineAsm.cpp
@@ -47,6 +47,7 @@ InlineAsm::InlineAsm(const PointerType *Ty, const std::string &asmString,
}
void InlineAsm::destroyConstant() {
+ getRawType()->getContext().pImpl->InlineAsms.remove(this);
delete this;
}
OpenPOWER on IntegriCloud