Skip to content
Commit bfc91314 authored by Ivan Krasin's avatar Ivan Krasin
Browse files

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
parent bbadf2b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment