[PATCH] CodeGen: Don't iterate over operands after we've erased an MI

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 12:10:52 PDT 2016


(Tim: sorry for the dup, I failed at sending email the first time)

This fixes a use-after-free introduced 3 years ago, in r182872 ;)

The code more or less works because the memory that CopyMI is pointing
too happens to still be valid, but lots of tests crash if you run this
under ASAN with the recycling allocator changes from llvm.org/PR26808

This seemed like the most NFC way to fix this, but I'm not terribly
familiar with the RegisterCoalescer so let me know if there's a better
way.

Thoughts?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: register-coalescer-use-after-free.patch
Type: text/x-patch
Size: 2177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160325/a2f0e993/attachment.bin>


More information about the llvm-commits mailing list