diff options
author | Ivan Krasin <krasin@chromium.org> | 2016-04-06 01:11:10 +0000 |
---|---|---|
committer | Ivan Krasin <krasin@chromium.org> | 2016-04-06 01:11:10 +0000 |
commit | bfc9131454a8a95196463612a49266ec1ae25bbd (patch) | |
tree | 983fe31d9c595cc660e28d30fb902ca5505bbbc4 /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp | |
parent | bbadf2b7e574a636a5b7e01c705b785e113fd951 (diff) | |
download | llvm-bfc9131454a8a95196463612a49266ec1ae25bbd.zip llvm-bfc9131454a8a95196463612a49266ec1ae25bbd.tar.gz llvm-bfc9131454a8a95196463612a49266ec1ae25bbd.tar.bz2 |
Fix a memory leak found by check-lld asan tests.
Summary:
This bug was introduced by http://reviews.llvm.org/rL265059,
where InputSectionBase got Thunks field, which can do memory allocations.
Since InputSectionBase destructors were never called (I count it as another bug),
that caused a memory leak when 2 or more thunks are added to a section.
The fix to is properly call InputSectionBase destructors from ~ObjectFile.
Reviewers: atanasyan, ruiu, rafael
Subscribers: rafael, krasin, pcc
Differential Revision: http://reviews.llvm.org/D18809
llvm-svn: 265497
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions