diff options
author | Nick Kledzik <kledzik@apple.com> | 2014-11-07 20:52:38 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2014-11-07 20:52:38 +0000 |
commit | 7bcfe288a81f2225b8c2e09c079a298450fd4ef1 (patch) | |
tree | bb263ea26df3f8426ac6dfcf2caefb96c5aff6fb /lldb/scripts/Python/build-swig-Python.sh | |
parent | 23755997e460714d46335de97701552ce0244317 (diff) | |
download | bcm5719-llvm-7bcfe288a81f2225b8c2e09c079a298450fd4ef1.tar.gz bcm5719-llvm-7bcfe288a81f2225b8c2e09c079a298450fd4ef1.zip |
Fix FileArchive member MemoryBuffer early destruction
When FileArchive loads a member, it instantiates a temporary MemoryBuffer
which points to the member range of the archive file. The problem is that the
object file parsers call getBufferIndentifer() on that temporary MemoryBuffer
and store that StringRef as the _path data member for that lld::File. When
FileArchive::instantiateMember() goes out of scope the MemoryBuffer is deleted
and the File::._path becomes a dangling reference.
The fix adds a vector<> to FileArchive to own the instantiated MemoryBuffers.
In addition it fixes member's path to be the standard format
(e.g. "/path/libfoo.a(foo.o)") instead of just the leaf name.
llvm-svn: 221544
Diffstat (limited to 'lldb/scripts/Python/build-swig-Python.sh')
0 files changed, 0 insertions, 0 deletions