Fix some leaks in lld's YAML parser

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 12:34:05 PST 2016


Hi Rafael

This should fix some of the leaks seen in PR 21466.

The cause was the MappingNormalizationHeap struct which was allocating atoms.  In the binary file parser we allocate atoms in the file::allocator() so that we can avoid the free cost later.  

This patch makes atoms use the file allocator in the YAML parser when needed.

Note, this doesn’t fix all the leaks.  There’s still a bunch I’m trying to understand, but its a good start.

Thanks
Pete

-------------- next part --------------
A non-text attachment was scrubbed...
Name: leaks.diff
Type: application/octet-stream
Size: 1926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160125/887d89c6/attachment.obj>


More information about the llvm-commits mailing list