<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>101119</bug_id>
          
          <creation_ts>2012-11-02 16:08:56 -0700</creation_ts>
          <short_desc>Crash calling is8Bit() in visitedLinkHash()</short_desc>
          <delta_ts>2022-02-28 04:05:23 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>757717</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2012-11-02 16:08:56 -0700</bug_when>
    <thetext>Changeset r133334: &lt;http://trac.webkit.org/changeset/133334&gt; introduced a call to is8Bit() on a possibly null string.  Appropriate checks need to be added for both KURL and attributeURL.

From &lt;rdar://problem/12628447&gt; Crash calling is8Bit() in visitedLinkHash():


I just crashed at the stack below.

Was at &lt;http://www.nationalmemo.com/why-do-so-many-republicans-really-hate-obama/&gt;, went into Reader mode, tried to scroll.

attributeURL is a null string.

    frame #13: 0x00000001011a6bf5 WebKit2`WebKit::WebConnectionToUIProcess::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&amp;) + 149 at WebConnectionToUIProcess.cpp:71
    frame #14: 0x00000001011a6c3d WebKit2`non-virtual thunk to WebKit::WebConnectionToUIProcess::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&amp;) + 61 at WebConnectionToUIProcess.cpp:72
    frame #15: 0x00000001010311f8 WebKit2`CoreIPC::Connection::dispatchMessage(CoreIPC::MessageID, CoreIPC::MessageDecoder&amp;) + 72 at Connection.cpp:663
    frame #16: 0x000000010102eade WebKit2`CoreIPC::Connection::dispatchMessage(CoreIPC::Connection::Message&lt;CoreIPC::MessageDecoder&gt;&amp;) + 318 at Connection.cpp:686
    frame #17: 0x00000001010311a9 WebKit2`CoreIPC::Connection::dispatchOneMessage() + 201 at Connection.cpp:712
    frame #18: 0x0000000101038040 WebKit2`WTF::FunctionWrapper&lt;void (CoreIPC::Connection::*)()&gt;::operator()(CoreIPC::Connection*) + 112 at Functional.h:174
    frame #19: 0x0000000101037fc5 WebKit2`WTF::BoundFunctionImpl&lt;WTF::FunctionWrapper&lt;void (CoreIPC::Connection::*)()&gt;, void (CoreIPC::Connection*)&gt;::operator()() + 53 at Functional.h:406
    frame #20: 0x00000001046417c9 WebCore`WTF::Function&lt;void ()&gt;::operator()() const + 137 at Functional.h:614
    frame #21: 0x000000010464140f WebCore`WebCore::RunLoop::performWork() + 207 at RunLoop.cpp:87
    frame #22: 0x000000010464291e WebCore`WebCore::RunLoop::performWork(void*) + 62 at RunLoopCF.cpp:66
    frame #23: 0x00007fff88383101 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #24: 0x00007fff88382aed CoreFoundation`__CFRunLoopDoSources0 + 445
    frame #25: 0x00007fff883a5dc5 CoreFoundation`__CFRunLoopRun + 789
    frame #26: 0x00007fff883a56b2 CoreFoundation`CFRunLoopRunSpecific + 290
    frame #27: 0x00007fff8e6ba0a4 HIToolbox`RunCurrentEventLoopInMode + 209
    frame #28: 0x00007fff8e6b9e42 HIToolbox`ReceiveNextEventCommon + 356
    frame #29: 0x00007fff8e6b9cd3 HIToolbox`BlockUntilNextEventMatchingListInMode + 62
    frame #30: 0x00007fff83ef8613 AppKit`_DPSNextEvent + 685
    frame #31: 0x00007fff83ef7ed2 AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
    frame #32: 0x00007fff83eef283 AppKit`-[NSApplication run] + 517
    frame #33: 0x000000010464359c WebCore`WebCore::RunLoop::run() + 92 at RunLoopMac.mm:36
    frame #34: 0x0000000101341449 WebKit2`WebKit::WebProcessMain(WebKit::CommandLine const&amp;) + 4233 at WebProcessMainMac.mm:190
    frame #35: 0x0000000101239a7a WebKit2`WebKitMain + 202 at WebKitMain.cpp:58
    frame #36: 0x0000000101239989 WebKit2`WebKitMain + 153 at WebKitMain.cpp:88</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>757723</commentid>
    <comment_count>1</comment_count>
      <attachid>172169</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2012-11-02 16:12:13 -0700</bug_when>
    <thetext>Created attachment 172169
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>757728</commentid>
    <comment_count>2</comment_count>
      <attachid>172169</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2012-11-02 16:19:03 -0700</bug_when>
    <thetext>Comment on attachment 172169
Patch

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

&gt; Source/WebCore/ChangeLog:8
&gt; +        Added a length check to AttributeURL and a isEmpty() check to KURL.

Nit: they&apos;re both isEmpty() checks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>757771</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2012-11-02 17:02:55 -0700</bug_when>
    <thetext>Committed r133377: &lt;http://trac.webkit.org/changeset/133377&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>172169</attachid>
            <date>2012-11-02 16:12:13 -0700</date>
            <delta_ts>2022-02-28 04:05:23 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>101119.patch</filename>
            <type>text/plain</type>
            <size>1400</size>
            <attacher name="Michael Saboff">msaboff</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDEzMzM2MykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDEyLTExLTAyICBNaWNoYWVs
IFNhYm9mZiAgPG1zYWJvZmZAYXBwbGUuY29tPgorCisgICAgICAgIENyYXNoIGNhbGxpbmcgaXM4
Qml0KCkgaW4gdmlzaXRlZExpbmtIYXNoKCkKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5v
cmcvc2hvd19idWcuY2dpP2lkPTEwMTExOQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAo
T09QUyEpLgorCisgICAgICAgIEFkZGVkIGEgbGVuZ3RoIGNoZWNrIHRvIEF0dHJpYnV0ZVVSTCBh
bmQgYSBpc0VtcHR5KCkgY2hlY2sgdG8gS1VSTC4KKworICAgICAgICAqIHBsYXRmb3JtL0xpbmtI
YXNoLmNwcDoKKyAgICAgICAgKFdlYkNvcmU6OnZpc2l0ZWRMaW5rSGFzaCk6CisKIDIwMTItMTEt
MDIgIFN0ZXBoZW4gQ2hlbm5leSAgPHNjaGVubmV5QGNocm9taXVtLm9yZz4KIAogICAgICAgICBS
ZWR1Y2UgcmVkdW5kYW50IGNvZGUgaW4gU2ltcGxlRm9udERhdGFbcGxhdGZvcm1dCkluZGV4OiBT
b3VyY2UvV2ViQ29yZS9wbGF0Zm9ybS9MaW5rSGFzaC5jcHAKPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291cmNl
L1dlYkNvcmUvcGxhdGZvcm0vTGlua0hhc2guY3BwCShyZXZpc2lvbiAxMzMzNTApCisrKyBTb3Vy
Y2UvV2ViQ29yZS9wbGF0Zm9ybS9MaW5rSGFzaC5jcHAJKHdvcmtpbmcgY29weSkKQEAgLTI5MSw3
ICsyOTEsMTAgQEAgdm9pZCB2aXNpdGVkVVJMKGNvbnN0IEtVUkwmIGJhc2UsIGNvbnN0IAogCiBM
aW5rSGFzaCB2aXNpdGVkTGlua0hhc2goY29uc3QgS1VSTCYgYmFzZSwgY29uc3QgQXRvbWljU3Ry
aW5nJiBhdHRyaWJ1dGVVUkwpCiB7Ci0gICAgaWYgKGJhc2Uuc3RyaW5nKCkuaXM4Qml0KCkgJiYg
YXR0cmlidXRlVVJMLmlzOEJpdCgpKSB7CisgICAgaWYgKGF0dHJpYnV0ZVVSTC5pc0VtcHR5KCkp
CisgICAgICAgIHJldHVybiAwOworCisgICAgaWYgKCFiYXNlLnN0cmluZygpLmlzRW1wdHkoKSAm
JiBiYXNlLnN0cmluZygpLmlzOEJpdCgpICYmIGF0dHJpYnV0ZVVSTC5pczhCaXQoKSkgewogICAg
ICAgICBWZWN0b3I8TENoYXIsIDUxMj4gdXJsOwogICAgICAgICB2aXNpdGVkVVJMSW5saW5lKGJh
c2UsIGF0dHJpYnV0ZVVSTC5jaGFyYWN0ZXJzOCgpLCBhdHRyaWJ1dGVVUkwubGVuZ3RoKCksIHVy
bCk7CiAgICAgICAgIGlmICh1cmwuaXNFbXB0eSgpKQo=
</data>
<flag name="review"
          id="186375"
          type_id="1"
          status="+"
          setter="fpizlo"
    />
          </attachment>
      

    </bug>

</bugzilla>