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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 22 01:56:15 PDT 2019


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

--- Comment #16 from Takashi Komori <Takashi.Komori at sony.com> ---
(In reply to Fujii Hironori from comment #11)
> Comment on attachment 369828 [details]
> 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.

Fixed.

-- 
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/20190522/fa0ee05f/attachment.html>


More information about the webkit-unassigned mailing list