[PATCH v5 06/12] libdwfl_stacktrace [6/12]: Elf* caching via dwflst_process_tracker

Aaron Merey amerey@redhat.com
Fri Apr 25 14:04:52 GMT 2025


On Fri, Apr 25, 2025 at 9:56 AM Serhei Makarov <serhei@serhei.io> wrote:
>
>
>
> On Fri, Apr 25, 2025, at 1:57 AM, Aaron Merey wrote:
> > Also if you haven't done so already, please run any manual tests under
> > valgrind memcheck (and helgrind if you are able to test this with
> > multithreading).
> Ran eu-stacktrace through valgrind; the content of the cache is marked as
> 'leaked' since eu-stacktrace doesn't bother to call elf_end
> (the caller of the find_elf callback holds a refcount in addition to the cache itself,
> to allow a user that *does* like to call elf_end() to continue doing so without
> invalidating the cached copy).
>
> This could be mitigated by having eu-stacktrace release the Elf *
> when they are placed in the cache, but I'll leave that for later work.

Ok that's reasonable to leave for later work.

Aaron



More information about the Elfutils-devel mailing list