[Webkit-unassigned] [Bug 36391] Potential for infinite recursion in SharedBuffer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 19 17:48:26 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36391





--- Comment #3 from Yong Li <yong.li.webkit at gmail.com>  2010-03-19 17:48:27 PST ---
(In reply to comment #2)
> Take a look at SharedBufferCF.cpp and SharedBuffer.cpp.  Here is how the
> recursion happens:
> 
> 1) The call to SharedBuffer::append() calls
> SharedBuffer::maybeTransferPlatformData().
> 2) If on a CF platform and m_cfData != 0,
> SharedBuffer::maybeTransferPlatformData() called SharedBuffer::append() to
> transfer the data in m_cfData into SharedBuffer segments.
> 3) SharedBuffer::append() again calls
> SharedBuffer::maybeTransferPlatformData().  Repeat...

Hm... so in 2), if we

if (m_cfData) {
 CFDataRef cfData(m_cfData);
 m_cfData = 0;
 append(cfData...);
}

Will this solve the problem and is it a good way?

-- 
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