Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 893787793b2eda796832100033d3f769a4c3fbcd
https://github.com/WebKit/WebKit/commit/893787793b2eda796832100033d3f769a4c3fbcd
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-23 (Thu, 23 Jul 2026)
Changed paths:
M Source/WTF/wtf/RecursiveLockAdapter.h
Log Message:
-----------
RecursiveLockAdapter::unlock() has no assertion guarding against underflow or
wrong-owner unlock
https://bugs.webkit.org/show_bug.cgi?id=320067
rdar://182990519
Reviewed by Chris Dumez.
unlock() decremented m_recursionCount without first verifying that the
calling thread actually owns the lock or that the count is non-zero,
so a mismatched or extra unlock() call would silently underflow
m_recursionCount and clear m_ownerThreadUID while the lock is still
held by another recursive acquisition. lock() and tryLock() already
assert their invariants; unlock() should too.
* Source/WTF/wtf/RecursiveLockAdapter.h:
(WTF::RecursiveLockAdapter::unlock): Assert isOwner() and
m_recursionCount before decrementing.
Canonical link: https://commits.webkit.org/317831@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications