[webkit-reviews] review denied: [Bug 97539] Broken and incorrect code in FastMalloc.cpp : [Attachment 165992] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 27 10:51:13 PDT 2012


Geoffrey Garen <ggaren at apple.com> has denied Mark Toller
<mark.toller at samsung.com>'s request for review:
Bug 97539: Broken and incorrect code in FastMalloc.cpp
https://bugs.webkit.org/show_bug.cgi?id=97539

Attachment 165992: Patch
https://bugs.webkit.org/attachment.cgi?id=165992&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
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.


More information about the webkit-reviews mailing list