Re: [PATCH 1/2] libdwfl: handle duplicate ELFs when reporting archives

2023-11-20 Thread Aleksei Vetrov
Hello Mark, On Sat, Nov 18, 2023 at 10:47 PM Mark Wielaard wrote: > If we goto overlap here don't we still have a problem? overlap will > set m->gc = true; and return NULL. So the caller will think they > still owns the elf handle and will probably close it. But then when > the module is GCed in

Re: [PATCH 1/2] libdwfl: handle duplicate ELFs when reporting archives

2023-11-18 Thread Mark Wielaard
Hi Aleksei, On Fri, Nov 17, 2023 at 10:35:40PM +, vvv...@google.com wrote: > When archive is processed in process_archive (libdwfl/offline.c), it > creates an Elf object for each archive member. Then in > process_archive_member it calls process_file to create a Dwfl_Module > through __libdwfl_

[PATCH 1/2] libdwfl: handle duplicate ELFs when reporting archives

2023-11-17 Thread vvvvvv
From: Aleksei Vetrov When archive is processed in process_archive (libdwfl/offline.c), it creates an Elf object for each archive member. Then in process_archive_member it calls process_file to create a Dwfl_Module through __libdwfl_report_elf. The ownership of the Elf object is expected to be: