]> granicus.if.org Git - llvm/commit
GlobalISel: prevent heap use-after-free when looking up VReg.
authorTim Northover <tnorthover@apple.com>
Fri, 20 Jan 2017 23:25:17 +0000 (23:25 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 20 Jan 2017 23:25:17 +0000 (23:25 +0000)
commit6955b2c2f5057301533fecd2c28a0155fa49a29b
tree88b74151225248f9acfc26b20c80d43602190068
parent9aea18bae5609bda1a3e0ab44cf8030c8c37e80a
GlobalISel: prevent heap use-after-free when looking up VReg.

Translating the constant can create more VRegs, which can invalidate the
reference into the DenseMap. So we have to look up the value again after all
that's happened.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292675 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/IRTranslator.cpp