Bug 177107 - [WPE][GTK] Crash in webkit_web_resource_get_data_finish()
Summary: [WPE][GTK] Crash in webkit_web_resource_get_data_finish()
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
: 175870 (view as bug list)
Depends on:
Reported: 2017-09-18 16:06 PDT by Michael Catanzaro
Modified: 2021-02-11 20:47 PST (History)
7 users (show)

See Also:

Backtrace (9.94 KB, text/plain)
2017-09-18 16:06 PDT, Michael Catanzaro
no flags Details
Patch (6.94 KB, patch)
2017-10-02 12:38 PDT, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2017-09-18 16:06:29 PDT
Created attachment 321146 [details]

I don't know how to reproduce this crash, but it occurred for me once today when I had broken WebKit so badly that resource loads never finished, started loading something, and used Ctrl+C. Backtrace attached. The problem is that resourceDataCallback always returns a success result with g_task_return_boolean(), but that's wrong if the callback was canceled. It should probably check if wkData is nullptr and use g_task_return_error() in that case.
Comment 1 Carlos Garcia Campos 2017-10-02 12:38:11 PDT
Created attachment 322411 [details]
Comment 2 Build Bot 2017-10-02 12:40:21 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Michael Catanzaro 2017-10-02 12:45:10 PDT
Comment on attachment 322411 [details]

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

Nice test

> Source/WebKit/ChangeLog:25
> +2017-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
> +
> +        [GTK][WPE] WebProcess should run cleanup on quit to release resources
> +        https://bugs.webkit.org/show_bug.cgi?id=168126
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Do not call exit on sync message send failure for GTK and WPE ports.
> +
> +        * WebProcess/WebProcess.cpp:
> +        (WebKit::WebProcess::initializeConnection):
> +

Fix the changelog
Comment 4 Carlos Garcia Campos 2017-10-02 12:48:47 PDT
Committed r222735: <http://trac.webkit.org/changeset/222735>
Comment 5 Carlos Garcia Campos 2017-10-04 03:44:42 PDT
*** Bug 175870 has been marked as a duplicate of this bug. ***