Fix some leaks in lld's YAML parser

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


Turns out there was also an llvm change.  I hadn’t realized it was split across the 2 projects.

Cheers,
Pete

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

> On Jan 25, 2016, at 12:34 PM, Pete Cooper <peter_cooper at apple.com> wrote:
> 
> 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
> 
> <leaks.diff>



More information about the llvm-commits mailing list