You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not following why this is a race. It looks that the main thread is doing pthread_mutex_trylock, in which case the mutex was created by T1 using pthread_mutex_init previously? Isn't that regular mutex operations?
@interwq thanks for your reply.
contrary to what you said, the main thread try lock the mutex which was initialized by main thread, but the thread may reinitialize the mutex again.
the following example will raise a race between main thread and thread with thread sanitizer.
reproduce:
The text was updated successfully, but these errors were encountered: