![]() |
|
Message-ID: <aDcixM_bFxsww_mB@voyager> Date: Wed, 28 May 2025 16:50:44 +0200 From: Markus Wichmann <nullplan@....net> To: musl@...ts.openwall.com Subject: Re: Deadlock in dynamic linker? Am Tue, May 27, 2025 at 02:26:15PM -0400 schrieb Rich Felker: > However I'm beginning to doubt this solution really works. The problem > is that, if A depends on B, A's ctor can be waiting to run pending B's > ctor finishing. But if a concurrent exit calls B's dtor, then A's ctor > is no longer free to run, because it depends on B being constructed. > We really do need to block execution of any ctor whose deps may > already have been destructed. > > Rich I am wondering if we are approaching this from the wrong end: Is it possible to make __libc_exit_fini() wait to call *any* destructors until all other threads have stopped calling initializers? That way, the other constructors can continue to run until they reach some valid state, rather than this in-betweeny one. I don't really see a nice way to do that, that also allows detecting multi-threaded fork() and exit() out of a constructor. Ciao, Markus
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.