[Webkit-unassigned] [Bug 146832] [Curl] Crash in CurlDownload::didReceiveHeader when downloading file.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 10 09:51:55 PDT 2015


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

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #256575|review?                     |review-
              Flags|                            |

--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 256575
  --> https://bugs.webkit.org/attachment.cgi?id=256575
Patch

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

> Source/WebCore/platform/network/curl/CurlDownload.cpp:402
> +            callOnMainThread([this, strUrl] {

What guarantees the CurlDownload won’t be deleted between now and when the function is called on the main thread?

It’s not thread-safe to capture a string on one thread and use it on another. We need to use StringCapture instead to pass strings across threads.

> Source/WebCore/platform/network/curl/CurlDownload.cpp:412
> +        callOnMainThread([this, header] {

What guarantees the CurlDownload won’t be deleted between now and when the function is called on the main thread?

It’s not thread-safe to capture a string on one thread and use it on another. We need to use StringCapture instead to pass strings across threads.

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


More information about the webkit-unassigned mailing list