[llvm-commits] [PATCH] Delete DyldObj when ELFObjectImage is destroyed

Roland Scheidegger sroland at vmware.com
Tue Jun 26 03:24:59 PDT 2012


Thanks for taking a look. I'm not sure I understand though, it looks to 
me like this only applies to the ELFObjectImage class? I'll have to 
admit though my C++ knowledge is a bit rusty.
But if you plan to clean this up anyway that's great.

Roland

On 06/25/2012 04:29 PM, Thirumurthi, Ashok wrote:
> Hi Roland,
>
> Thanks for catching the leak!  The fix looks correct for ELF, however the more generic fix would have ~ObjectImage perform the cleanup since your fix would apply to future code that handled MCJIT for other object formats.
>
> Incidentally, we plan to upstream a related cleanup of object ownership that spans all of ExecutionEngine.  This was inspired by issues that we ran into when trying to implement profiling support for MCJIT with the currently tangled web of inter-dependencies.
>
> We'd also like to make it straight-forward for folks that want to cache an MCJIT binary to grab a buffer for later use with RuntimeDyld.
>
> - Ashok Thirumurthi
> Intel of Canada
>
> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Roland Scheidegger
> Sent: Thursday, June 21, 2012 2:54 PM
> To: llvm-commits at cs.uiuc.edu
> Subject: [llvm-commits] [PATCH] Delete DyldObj when ELFObjectImage is destroyed
>
> (Sorry sent to wrong list first)
>
> Otherwise MCJIT will leak memory.
> (Tested with 3.1 branch more extensively but applies to trunk as well.)
>
> Roland
>
>





More information about the llvm-commits mailing list