]> granicus.if.org Git - clang/commit
Fix use-after-free found in Clang's testsuite.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 27 Sep 2019 05:36:16 +0000 (05:36 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 27 Sep 2019 05:36:16 +0000 (05:36 +0000)
commite4d0faf011db11a33590755ca70c51642d64ba5b
tree90552015ae66d663c6ad176b7ab511d48bfedbc9
parent26105cbd682a5756098f2360ebde8b194ce698b5
Fix use-after-free found in Clang's testsuite.

We need to discard all remaining cleanups if an earlier cleanup failed,
otherwise we may try to rerun the remaining cleanups later, potentially
after the scope containing the object is destroyed. (This can happen
when checking a potential constant expression.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373042 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp