summaryrefslogtreecommitdiff
path: root/lib/VMCore/InlineAsm.cpp
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
commit1aabe1b49371f7e7a9898a3060653fcfa6ee497c (patch)
tree4b51bb3c5ce9aeddf4b36d9847098b2a63453406 /lib/VMCore/InlineAsm.cpp
parent28b108250d302cca8e71d13f2fe5d954c1d6c33a (diff)
downloadllvm-1aabe1b49371f7e7a9898a3060653fcfa6ee497c.tar.gz
llvm-1aabe1b49371f7e7a9898a3060653fcfa6ee497c.tar.bz2
llvm-1aabe1b49371f7e7a9898a3060653fcfa6ee497c.tar.xz
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!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/InlineAsm.cpp')
-rw-r--r--lib/VMCore/InlineAsm.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VMCore/InlineAsm.cpp b/lib/VMCore/InlineAsm.cpp
index d951a29f43..e4f99f09a5 100644
--- a/lib/VMCore/InlineAsm.cpp
+++ b/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;
}