[asterisk-bugs] [JIRA] (ASTERISK-24154) [patch]PTHREAD_MUTEX_INITIALIZER should not be assumed to be recursive mutex
Rusty Newton (JIRA)
noreply at issues.asterisk.org
Thu Aug 7 09:54:30 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-24154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rusty Newton updated ASTERISK-24154:
------------------------------------
Summary: [patch]PTHREAD_MUTEX_INITIALIZER should not be assumed to be recursive mutex (was: PTHREAD_MUTEX_INITIALIZER should not be assumed to be recursive mutex)
> [patch]PTHREAD_MUTEX_INITIALIZER should not be assumed to be recursive mutex
> ----------------------------------------------------------------------------
>
> Key: ASTERISK-24154
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-24154
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/Portability
> Affects Versions: 12.4.0
> Reporter: Timo Teräs
> Attachments: musl-mutex-init.patch
>
>
> Currently the build system recognizes if PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is available, and uses it only if detected. If it is not available, PTHREAD_MUTEX_INITIALIZER is used instead. Only on Solaris and BSD, the code revers using constructors to call pthread_mutex_init with proper attributes to create recursive mutex.
> This logic is wrong. PTHREAD_MUTEX_INITIALIZER is not guaranteed to create recursive mutex. Please do that assumption only on GLIBC or other C-libraries where this is a known fact.
> Current code is broken assumably on non-GLIBC systems not explicitly listed. One notable example is musl c-library based Linux systems.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list