This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
analysis cannot tell that the mutex was locked
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 19 Nov 2015 02:25:04 +0000 (21:25 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 23 Nov 2015 11:55:12 +0000 (06:55 -0500)
commitbf08b074ada737bd7f8c56711aefd829d4740cfd
treeed05e6d6e1cdae4b90c5f563f0824f68f8195f3d
parent78d35ce204926ecd797db064ca69e45a82b8f6ca
analysis cannot tell that the mutex was locked

It was locked in S_ithread_create() - in case it returned a non-NULL thread.
Because of this conditionality the S_ithread_create() cannot be annotated.

threads.xs:1161:9: warning: releasing mutex 'thread->mutex' that was not held [-Wthread-safety-analysis]
        MUTEX_UNLOCK(&thread->mutex);
dist/threads/threads.xs