[PATCH] elf: Release dl_load_lock before running dlopen constructors (BZ 15686)

Artem Proskurnev temap@mail.ru
Mon Jul 13 17:16:24 GMT 2026


Florian,
> * Alexander Pevzner:
>
>> Florian,
>>
>>> I think if you arrange for suitable sleeps or barriers, you can get a
>>> second dlopen for the same object on another thread to return while the
>>> constructor is still executing on a first thread.  This was not possible
>>> before.
>> You mean the situation, when two threads dlopen-s the same DSO
>> simultaneously, correct?
> Yes, or for different DSOs if they happen to have a shared dependency.
>
> Thanks,
> Florian
>
I will try to use pthread_once in call_init to solve this problem. I 
will test it and write the results.

Thanks for pointing that.



More information about the Libc-alpha mailing list