From: ASOU Masato Subject: Re: ld.so not calling destructor To: Alexander Bluhm Cc: tech@openbsd.org, Philip Guenther Date: Thu, 13 Feb 2025 16:25:07 +0900 On Wed, Feb 12, 2025 at 9:56 PM Alexander Bluhm wrote: > > On Fri, Jan 17, 2025 at 02:24:12PM +0900, ASOU Masato wrote: > > On Fri, Jan 17, 2025 at 2:19???PM ASOU Masato wrote: > > > I applied your patch and following diff: > > With a slightly different patch for ld.so, only run-regress-prog1 > of regress is failing. I moved down the call to _dl_unlink_children() > a bit. Also with this fix, a workaround a patch for llvm-openmp > can be removed. It seems that the callbacks are called in the right > order now. > > Nevertheless, the failing regress looks relevant regarding ordering > of destructors and needs more thoughts. > > bluhm Maybe I found the cause of this problem. I think it's a problem with the `next' and `prev' opelations below: struct elf_object { struct elf_object *next; struct elf_object *prev; Please give me some more time. -- ASOU Masato