]> granicus.if.org Git - llvm/commit
Merging r226029:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 15 Jan 2015 03:58:02 +0000 (03:58 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 15 Jan 2015 03:58:02 +0000 (03:58 +0000)
commit7a539a8113c6c7356730b459028e5214e0637115
tree76eeab3e3735bdbfee0d9b600b15ee651d44556d
parent97ae37b5f320d9fed965f51cbc0d49cb11b82bab
Merging r226029:
------------------------------------------------------------------------
r226029 | dexonsmith | 2015-01-14 11:56:10 -0800 (Wed, 14 Jan 2015) | 7 lines

IR: Fix a use-after-free in RAUW

Happened pretty commonly during `LLVMContext` teardown when `clang -g`
hit an error.  This fixes the use-after-free.  Next I'll clean up
teardown so that it's not RAUW'ing when metadata-tracked values are
deleted (only really causes a problem if the graph is mid-construction
when teardown starts, but it's still unnecessary work).
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@226090 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Metadata.cpp
unittests/IR/MetadataTest.cpp