This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libdw: Make sure Ebl is always freed from cfi frame cache.


On Thu, 2015-11-19 at 12:37 +0100, Mark Wielaard wrote:
> libdwfl sets the Dwfl_Module Ebl for the eh_cfi and dwarf_cfi cache to
> save a bit of memory. It also calls ebl_closebackend on the ebl to free
> it. The Dwarf_CFI never frees the Ebl in the cache, even when it opened
> one itself. This means that if only libdw calls are used to access the
> Dwarf_CFI the Ebl might be leaked.
> 
> Always destroy the Dwarf_CFI cache Ebl in __libdw_destroy_frame_cache.
> And in __libdwfl_module_free clear the Dwarf_CFI Ebl if it is the
> Dwfl_Module Ebl before calling dwarf_cfi_end and dwarf_end.

I pushed this to elfutils master.

Masami, please let me know if you need any help with the other leaks you
found in perf using libdw.

Thanks,

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]