When substituting sunkaddrs into indirect arguments an asm, we were
authorDale Johannesen <dalej@apple.com>
Thu, 16 Sep 2010 18:30:55 +0000 (18:30 +0000)
committerDale Johannesen <dalej@apple.com>
Thu, 16 Sep 2010 18:30:55 +0000 (18:30 +0000)
commit677c6ecd0804c247eb727a830b50cd6537a6c12c
treee1997b1bcf1f3531e2c50153787ab449961da23f
parentc2ce21ad51590377b572a572243e373f7a7b9fb4
When substituting sunkaddrs into indirect arguments an asm, we were
walking the asm arguments once and stashing their Values.  This is
wrong because the same memory location can be in the list twice, and
if the first one has a sunkaddr substituted, the stashed value for the
second one will be wrong (use-after-free).  PR 8154.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114104 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CodeGenPrepare.cpp
test/CodeGen/X86/2010-09-16-asmcrash.ll [new file with mode: 0644]