Deadlock when calling pthread_key_create in the destructor of a pthread_key
Takashi Yano
takashi.yano@nifty.ne.jp
Tue Apr 8 14:57:47 GMT 2025
On 2025年3月23日 20:32:44 +0800
Yuyi Wang wrote:
> It's a bug when I tried to run tests of Rust std lib. The standard
> library of Rust tries to create a new pthread_key in the destructor of a
> key created previously. Unfortunately, List::for_each locked the mutex
> before, so List_insert method cannot lock the mutex again.
>> I have searched though the POSIX docs and didn't find any words that one
> should not call pthread_key_create in the destructor of a pthread_key. I
> think it should be a bug of cygwin.
Fixed. Please try cygwin-3.7.0-0.49.g42df80dad079.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
More information about the Cygwin
mailing list