<?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>15397</bug_id>
          
          <creation_ts>2007-10-06 05:24:43 -0700</creation_ts>
          <short_desc>Layout tests freeze in HashTable::lookup</short_desc>
          <delta_ts>2007-10-08 11:15:57 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac (PowerPC)</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Alexey Proskuryakov">ap</assigned_to>
          <cc>hyatt</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57937</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-06 05:24:43 -0700</bug_when>
    <thetext>The below reliably freezes for me:

$ run-webkit-tests svg/W3C-SVG-1.1/text-align-06-b.svg --pixel

The problem is in FontPlatformData constructor: &quot;sending to nil&quot; Cocoa magic doesn&apos;t work with non-integral values:

    if (f)
        CFRetain(f);
    m_size = [f pointSize];

This results in emptyValue being non-zero, and deeply confuses WTF::HashTable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57938</commentid>
    <comment_count>1</comment_count>
      <attachid>16567</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-06 05:29:32 -0700</bug_when>
    <thetext>Created attachment 16567
proposed fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57939</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-06 05:38:34 -0700</bug_when>
    <thetext>Looks like this issue isn&apos;t present on trunk - at least, I couldn&apos;t find such code there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57973</commentid>
    <comment_count>3</comment_count>
      <attachid>16567</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-10-06 19:25:55 -0700</bug_when>
    <thetext>Comment on attachment 16567
proposed fix

The change looks sane. I don&apos;t understand the removal of the -1 checks (or why they were there in the first place).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58000</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-07 01:44:48 -0700</bug_when>
    <thetext>I have removed the -1 checks because there was an unchecked call to [font pointSize] in this function anyway - so guarding against the same problem in other places wasn&apos;t really helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58089</commentid>
    <comment_count>5</comment_count>
      <attachid>16567</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-10-08 08:28:47 -0700</bug_when>
    <thetext>Comment on attachment 16567
proposed fix

If the checks for -1 really aren&apos;t necessary, then perhaps m_font can be changed into a RetainPtr?

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58097</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-08 09:27:53 -0700</bug_when>
    <thetext>&gt; If the checks for -1 really aren&apos;t necessary, then perhaps m_font can be
&gt; changed into a RetainPtr?

It&apos;s OK for m_font to be -1 (it&apos;s a special value used for &quot;Deleted&quot;), but apparently not for setFont() parameter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58100</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-08 09:31:20 -0700</bug_when>
    <thetext>Committed revision 26105.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58107</commentid>
    <comment_count>8</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2007-10-08 10:38:06 -0700</bug_when>
    <thetext>Thanks for catching this.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58111</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-10-08 11:15:57 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; It&apos;s OK for m_font to be -1 (it&apos;s a special value used for &quot;Deleted&quot;), but
&gt; apparently not for setFont() parameter.

Oops, one of the removed checks was necessary in fact:
-    if (m_font &amp;&amp; m_font != (NSFont*)-1)
+    if (m_font)

Restored it in r26107.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>16567</attachid>
            <date>2007-10-06 05:29:32 -0700</date>
            <delta_ts>2007-10-08 08:28:47 -0700</delta_ts>
            <desc>proposed fix</desc>
            <filename>15397r1_patch.txt</filename>
            <type>text/plain</type>
            <size>1842</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAyNjA4MSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTggQEAKKzIwMDctMTAtMDYgIEFsZXhleSBQcm9za3VyeWFrb3YgIDxhcEB3ZWJr
aXQub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QU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DcgQEAgRm9udFBsYXRmb3JtRGF0YTo6Rm9udFBsYXRmb3JtRGF0YShOU0Zvbgogewog
ICAgIGlmIChmKQogICAgICAgICBDRlJldGFpbihmKTsKLSAgICBtX3NpemUgPSBbZiBwb2ludFNp
emVdOworICAgIG1fc2l6ZSA9IGYgPyBbZiBwb2ludFNpemVdIDogMC4wZjsKICAgICBtX2NnRm9u
dCA9IHdrR2V0Q0dGb250RnJvbU5TRm9udChmKTsKICAgICBtX2F0c3VGb250SUQgPSB3a0dldE5T
Rm9udEFUU1VGb250SWQoZik7CiB9CkBAIC01NiwxMiArNTYsMTIgQEAgRm9udFBsYXRmb3JtRGF0
YTo6IH5Gb250UGxhdGZvcm1EYXRhKCkKIHZvaWQgRm9udFBsYXRmb3JtRGF0YTo6c2V0Rm9udChO
U0ZvbnQqIGZvbnQpIHsKICAgICBpZiAobV9mb250ID09IGZvbnQpCiAgICAgICAgIHJldHVybjsK
LSAgICBpZiAoZm9udCAmJiBmb250ICE9IChOU0ZvbnQqKS0xKQorICAgIGlmIChmb250KQogICAg
ICAgICBDRlJldGFpbihmb250KTsKLSAgICBpZiAobV9mb250ICYmIG1fZm9udCAhPSAoTlNGb250
KiktMSkKKyAgICBpZiAobV9mb250KQogICAgICAgICBDRlJlbGVhc2UobV9mb250KTsKICAgICBt
X2ZvbnQgPSBmb250OwotICAgIG1fc2l6ZSA9IFtmb250IHBvaW50U2l6ZV07CisgICAgbV9zaXpl
ID0gZm9udCA/IFtmb250IHBvaW50U2l6ZV0gOiAwLjBmOwogICAgIG1fY2dGb250ID0gd2tHZXRD
R0ZvbnRGcm9tTlNGb250KGZvbnQpOwogICAgIG1fYXRzdUZvbnRJRCA9IHdrR2V0TlNGb250QVRT
VUZvbnRJZChmb250KTsKIH0K
</data>
<flag name="review"
          id="6985"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>