Bug 34602 - [GTK] Crashes when an invalid hostname is pre-fetched
Summary: [GTK] Crashes when an invalid hostname is pre-fetched
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL: http://bloggerimkino.ch/wordpress/
Keywords: Gtk, Soup
Depends on:
Blocks:
 
Reported: 2010-02-04 10:08 PST by Gustavo Noronha (kov)
Modified: 2010-02-04 11:29 PST (History)
2 users (show)

See Also:


Attachments
avoid crash (4.69 KB, patch)
2010-02-04 10:38 PST, Gustavo Noronha (kov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Noronha (kov) 2010-02-04 10:08:02 PST
This is the console output:

(DumpRenderTree:19566): libsoup-CRITICAL **: soup_uri_host_hash: assertion `uri != NULL && uri->host != NULL' failed

(DumpRenderTree:19566): libsoup-CRITICAL **: soup_uri_copy_host: assertion `uri != NULL' failed

A snippet of the trace:

#0  0x00007ffff14536a5 in ?? () from /usr/lib/libsoup-2.4.so.1
#1  0x00007ffff145373a in soup_session_prepare_for_uri ()
   from /usr/lib/libsoup-2.4.so.1
#2  0x00007ffff6948ce9 in WebCore::prefetchDNS (hostname=...)
    at ../../WebCore/platform/network/soup/DNSSoup.cpp:46
#3  0x00007ffff637890d in WebCore::HTMLAnchorElement::parseMappedAttribute (
    this=0xa391e0, attr=0xa49890)
    at ../../WebCore/html/HTMLAnchorElement.cpp:282
#4  0x00007ffff62bdac6 in WebCore::StyledElement::attributeChanged (
    this=0xa391e0, attr=0xa49890, preserveDecls=false)
    at ../../WebCore/dom/StyledElement.cpp:190

The problem is SoupURI will give you a NULL URI if it is given an invalid URI, which is the case here.
Comment 1 Gustavo Noronha (kov) 2010-02-04 10:38:06 PST
Created attachment 48155 [details]
avoid crash
Comment 2 WebKit Review Bot 2010-02-04 10:43:02 PST
Attachment 48155 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/platform/network/soup/DNSSoup.cpp:41:  Use 0 instead of NULL.  [readability/null] [4]
Total errors found: 1


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Xan Lopez 2010-02-04 10:56:25 PST
Comment on attachment 48155 [details]
avoid crash

I am Xan Lopez and I approve this patch.
Comment 4 Gustavo Noronha (kov) 2010-02-04 10:58:12 PST
(In reply to comment #2)
> Attachment 48155 [details] did not pass style-queue:
> 
> Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
> WebCore/platform/network/soup/DNSSoup.cpp:41:  Use 0 instead of NULL. 
> [readability/null] [4]
> Total errors found: 1

False-positive, reported here: https://bugs.webkit.org/show_bug.cgi?id=34605
Comment 5 WebKit Commit Bot 2010-02-04 11:29:25 PST
Comment on attachment 48155 [details]
avoid crash

Clearing flags on attachment: 48155

Committed r54359: <http://trac.webkit.org/changeset/54359>
Comment 6 WebKit Commit Bot 2010-02-04 11:29:31 PST
All reviewed patches have been landed.  Closing bug.