[llvm] r292133 - Fix use-after-free bug in AffectedValueCallbackVH::allUsesReplacedWith

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 10:03:32 PST 2017

On 16 Jan 2017, at 16:22, Hal Finkel via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> Author: hfinkel
> Date: Mon Jan 16 09:22:01 2017
> New Revision: 292133
> URL: http://llvm.org/viewvc/llvm-project?rev=292133&view=rev
> Log:
> Fix use-after-free bug in AffectedValueCallbackVH::allUsesReplacedWith
> When transferring affected values in the cache from an old value, identified by
> the value of the current callback, to the specified new value we might need to
> insert a new entry into the DenseMap which constitutes the cache. Doing so
> might delete the current callback object. Move the copying logic into a new
> function, a member of the assumption cache itself, so that we don't run into UB
> should the callback handle itself be removed mid-copy.
> Differential Revision: https://reviews.llvm.org/D28749

Please merge this to release_40, when it's baked a little.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170116/3ab1907c/attachment.sig>

More information about the llvm-commits mailing list