[Webkit-unassigned] [Bug 197873] [CURL] Fix crashing SocketStreamHandle.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat May 25 02:37:40 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=197873
--- Comment #30 from Takashi Komori <Takashi.Komori at sony.com> ---
(In reply to Fujii Hironori from comment #20)
> Comment on attachment 370479 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=370479&action=review
>
> > Source/WebCore/platform/network/curl/SocketStreamHandleImpl.h:83
> > + using WriteBuffer = StreamBuffer<uint8_t, 1024 * 1024>;
>
> You should use StreamBuffer. It ends up doing memcpy twice.
> You have two choices:
> 1. Allocate a write buffer which has the same size with each chunk. And pass
> the buffer from the main thread to the worker thread.
> 2. Allocate a fixed-size write buffer, and reuse.
>
> > Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp:89
> > + memcpy(sendData.data(), data, length);
>
> memcpy first.
>
> > Source/WebCore/platform/network/curl/SocketStreamHandleImplCurl.cpp:94
> > + m_writeBuffer->append(sendData.data(), sendData.size());
>
> memcpy second.
Fixed by allocating buffer for each send data.
--
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/20190525/2301cdc5/attachment-0001.html>
More information about the webkit-unassigned
mailing list