[Webkit-unassigned] [Bug 97539] Broken and incorrect code in FastMalloc.cpp
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 27 10:51:14 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=97539
Geoffrey Garen <ggaren at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #165992|review? |review-
Flag| |
--- Comment #15 from Geoffrey Garen <ggaren at apple.com> 2012-09-27 10:51:40 PST ---
(From update of attachment 165992)
View in context: https://bugs.webkit.org/attachment.cgi?id=165992&action=review
>> Source/WTF/wtf/FastMalloc.cpp:2555
>> + // m_scavengeThreadActive protected by pageheap_lock.
>
> Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3]
m_scavengeThreadActive is an atomic variable. Why do you need to lock across assignment?
> Source/WTF/wtf/FastMalloc.cpp:2564
> pthread_mutex_unlock(&m_scavengeMutex);
I believe this unlock is wrong, as per the pthread_cond_mutex man page:
The pthread_cond_wait() function atomically unlocks the mutex argument
and waits on the cond argument. Before returning control to the calling
function, pthread_cond_wait() re-acquires the mutex.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list