]> granicus.if.org Git - clang/commit
Thread Safety Analysis: Fix DenseMap iterator invalidation UAF
authorReid Kleckner <rnk@google.com>
Fri, 20 Nov 2015 19:08:30 +0000 (19:08 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 20 Nov 2015 19:08:30 +0000 (19:08 +0000)
commit818f7069b83ab27ed8dfc6f2714d829743ae0f28
tree8fd416d3ecb62ed5a91f7601aeb7bc2c3ac8eef9
parentf57d2f430da6df55c405e1c85a02e233dac5c892
Thread Safety Analysis: Fix DenseMap iterator invalidation UAF

Rather than storing BeforeInfo in the DenseMap by value, this stores a
unique_ptr to it, so that we can keep a pointer to it live across
subsequent DenseMap insertions.

This change also removes the unique_ptr wrapper around BeforeVect
because now we're indirecting at a higher level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253694 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ThreadSafety.cpp