[lld] r256311 - Fix another asan detected leak.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 22 17:18:40 PST 2015
Author: rafael
Date: Tue Dec 22 19:18:40 2015
New Revision: 256311
URL: http://llvm.org/viewvc/llvm-project?rev=256311&view=rev
Log:
Fix another asan detected leak.
Modified:
lld/trunk/ELF/InputFiles.cpp
lld/trunk/ELF/InputFiles.h
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=256311&r1=256310&r2=256311&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Tue Dec 22 19:18:40 2015
@@ -238,7 +238,7 @@ void elf2::ObjectFile<ELFT>::initializeS
Sections[I] =
new (this->Alloc) MipsReginfoInputSection<ELFT>(this, &Sec);
else if (shouldMerge<ELFT>(Sec))
- Sections[I] = new (this->Alloc) MergeInputSection<ELFT>(this, &Sec);
+ Sections[I] = new (this->MAlloc.Allocate()) MergeInputSection<ELFT>(this, &Sec);
else
Sections[I] = new (this->Alloc) InputSection<ELFT>(this, &Sec);
break;
Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=256311&r1=256310&r2=256311&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Tue Dec 22 19:18:40 2015
@@ -135,6 +135,7 @@ private:
std::vector<SymbolBody *> SymbolBodies;
llvm::BumpPtrAllocator Alloc;
+ llvm::SpecificBumpPtrAllocator<MergeInputSection<ELFT>> MAlloc;
};
class ArchiveFile : public InputFile {
More information about the llvm-commits
mailing list