<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95063>95063</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
std::shared_mutex doesn't have capability "shared_mutex"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
fftonello
</td>
</tr>
</table>
<pre>
shared_mutex is defined without the capability "shared_mutex" used for thread safety analysis. See https://cs.android.com/android/platform/superproject/main/+/main:external/libcxx/include/shared_mutex;l=180
```
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
{
…
};
```
Interestingly the base class has it: https://cs.android.com/android/platform/superproject/main/+/main:external/libcxx/include/shared_mutex;l=147
```
struct _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("shared_mutex"))
__shared_mutex_base
{
…
};
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMU0FvozwQ_TXmYjUyNhA4cDAfQUXq11ZNttqekMFD8MqByDZt8u9XUNqm2tWu1NNKlmHGejPPz2-EtWrfA6QozFCYe2J03WDStnVDD1oPXj3Ic2o7YUBWh9HBCSuLJbSqB4lflOuG0WHXAW7EUdRKK3fGiNJLBKIUjxYkbgeDXWdASGxFC-6MRS_02Sq7wlsA3Dl3tIhxRAtEi8auRC_NoOSqGQ6IFkuEaHHUwrWDmZJ2PII5muEHNA7R4iBUP8Ozt4BxODkwvdCIFlrVzemEaKH6Ro8SpgKXTFmmEcv9mCCSI8KXPSLLmsNGC2txdVNm_93fV7un-031WG7fE_yRlzc8K2_K3VO1veYPm7z6_9tu8x1_6vRaeZ0tPxuKYoJ49JbPEct-2_1yL3sHBqxT_V6f50eohQX8SrATFiuHGP93ZA3Wf5DVOjM27iu6vkOuHzY8r7a82OyeKn57e7fju_LuFtH4w5yIxr_aE9FkWjOPqro8rCZFv_xYnkyZTFgiPEj9tR-TKAhZ4nUpsDAhbbxmDaMEAEJRi5rUlDW0DhoZeyqlhAYk8n1CSBwmK8oiH_y2DRgRUdQCCggchNIrrZ8Pq8HsPWXtCGkSkoh5WtSg7TzUlPbwgufD6aZh7pl0wlzV496igGhlnf2o4pTTkFonJ8Mw_mny5QC2R3TtcCee_zLx3mh0-tl5e-W6sV5cNzVcPlcfPptpWkSL12s8p_RnAAAA__9yyW_W">