Bug 227069 - [WTF] DataMutex: Assert on double locking on the same thread
Summary: [WTF] DataMutex: Assert on double locking on the same thread
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alicia Boya García
URL:
Keywords: InRadar
: 227021 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-16 07:46 PDT by Alicia Boya García
Modified: 2021-06-16 19:07 PDT (History)
7 users (show)

See Also:


Attachments
Patch (4.95 KB, patch)
2021-06-16 07:48 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alicia Boya García 2021-06-16 07:46:56 PDT
DataMutex used to use OwnerAwareLock to track what thread is holding
the mutex and emit assertion errors if a thread is found attempting to
lock a mutex held by that same thread. This turns deadlocks into
runtime errors.

OwnerAwareLock was removed when DataMutex got clang thread safety
annotations. This patch reintroduces the same logic, while keeping
thread-safety annotations.

This fixes WTF_DataMutex.DoubleLockDeathTest, which tested this
functionality and was previously regressed.
Comment 1 Alicia Boya García 2021-06-16 07:48:55 PDT
Created attachment 431545 [details]
Patch
Comment 2 EWS 2021-06-16 08:41:22 PDT
Committed r278936 (238867@main): <https://commits.webkit.org/238867@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431545 [details].
Comment 3 Radar WebKit Bug Importer 2021-06-16 08:42:25 PDT
<rdar://problem/79399360>
Comment 4 Fujii Hironori 2021-06-16 19:07:58 PDT
*** Bug 227021 has been marked as a duplicate of this bug. ***