]> granicus.if.org Git - llvm/commit
Fix use-after-free with profile remapping.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 19 Dec 2018 03:24:03 +0000 (03:24 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 19 Dec 2018 03:24:03 +0000 (03:24 +0000)
commit11acfd478b7ddac9f9af6fc9cd72d5f4897a4b83
treed05abe49cad15d1a9c4797e7d47aca57c636416b
parent979b87d6b778b695f8dafb81b3ce96224e13fb53
Fix use-after-free with profile remapping.

We need to keep the underlying profile reader alive as long as the
profile data, because the profile data may contain StringRefs referring
to strings in the reader's name table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349600 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProfReader.h
unittests/ProfileData/SampleProfTest.cpp