[LLVMbugs] [Bug 21682] New: TrieEdge leak in MachONormalizedFileBinaryWriter.cpp
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Nov 27 04:17:26 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21682
Bug ID: 21682
Summary: TrieEdge leak in MachONormalizedFileBinaryWriter.cpp
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: devlists at shadowlab.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
TrieNode uses a SmallVector to store TrieEdge children.
But TrieNode is allocated using an llvm::bumpPtr allocator, and so its
destructor is never invoked when the memory is freed. As a result the
SmallVector destructor is never call either, and as the SmallVector is not
allocator aware, the memory managed by the SmallVector leaks.
A possible solution would be to use an other structure to store the TrieEdge
(chained list) that does not require additional memory allocation.
TrieEdge will contain a pointer to its sibling, and will be allocated using the
llvm bumpPtr allocator.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141127/196bf1c1/attachment.html>
More information about the llvm-bugs
mailing list