[Webkit-unassigned] [Bug 197873] [CURL] Fix crashing SocketStreamHandle.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 16 18:03:46 PDT 2019


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

--- Comment #11 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Comment on attachment 369828
  --> https://bugs.webkit.org/attachment.cgi?id=369828
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=369828&action=review

>>> Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp:-146
>>> -                m_writeBuffer = nullptr;
>> 
>> Why do you want not to release the buffer here? It successfully sent the whole buffer.
> 
> Handling m_writeBuffer here is not thread safe.
> In main thread m_writeBuffer is updated in SocketStreamHandleImpl::platformSendInternal.

It is synchronized by std::atomic. See Basuke's comment in platformSendInternal.
https://github.com/WebKit/webkit/blob/3354f5558fa5382fd176778364132d4444910735/Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp#L77,L90

However, I don't like this style. I like the style using mutex and messages passing cross-thread.
It should put the buffer in a message, and pass the message from the main thread to curl thread.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190517/13543900/attachment.html>


More information about the webkit-unassigned mailing list