RESOLVED FIXED 90639
JSString::tryHashConstLock() fails to get exclusive lock
https://bugs.webkit.org/show_bug.cgi?id=90639
Summary JSString::tryHashConstLock() fails to get exclusive lock
Michael Saboff
Reported 2012-07-05 15:21:28 PDT
The code in JSString::tryHashConstLock() can return true when another thread currently has the lock. unsigned currentFlags = m_flags; unsigned newFlags = currentFlags | HashConstLock; if (!WTF::weakCompareAndSwap(&m_flags, currentFlags, newFlags)) return false; WTF::memoryBarrierAfterLock(); return true; It may be the case that m_flags, and therefore currentFlags has the HashConstLock bit set, but there isn't a check for that in the code after setting currentFLags. This can be remedied by adding: if (currentFlags & HashConstLock) return false; after the assignment to currentFlags.
Attachments
Patch (1.26 KB, patch)
2012-07-05 15:30 PDT, Michael Saboff
oliver: review+
Michael Saboff
Comment 1 2012-07-05 15:30:46 PDT
Michael Saboff
Comment 2 2012-07-05 17:04:18 PDT
Note You need to log in before you can comment on or make changes to this bug.