<?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>114895</bug_id>
          
          <creation_ts>2013-04-19 19:04:46 -0700</creation_ts>
          <short_desc>SunSpider/string-tagcloud should be more lenient in validating its results, since they depend on Math.log, which isn&apos;t formally specified</short_desc>
          <delta_ts>2013-04-20 13:10:28 -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>Tools / Tests</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>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Filip Pizlo">fpizlo</reporter>
          <assigned_to name="Filip Pizlo">fpizlo</assigned_to>
          <cc>barraclough</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mhahnenberg</cc>
    
    <cc>mjs</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>878697</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-04-19 19:04:46 -0700</bug_when>
    <thetext>Patch forthcoming.

&lt;rdar://13699853&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878698</commentid>
    <comment_count>1</comment_count>
      <attachid>198923</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-04-19 19:09:24 -0700</bug_when>
    <thetext>Created attachment 198923
the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878764</commentid>
    <comment_count>2</comment_count>
      <attachid>198923</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-04-20 06:50:18 -0700</bug_when>
    <thetext>Comment on attachment 198923
the patch

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

r=me

&gt; PerformanceTests/SunSpider/tests/sunspider-1.0/string-tagcloud.js:266
&gt; +var expectedMinLength = 315000;

How did you come up with this being enough in all cases?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878792</commentid>
    <comment_count>3</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-04-20 13:09:12 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 198923 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=198923&amp;action=review
&gt; 
&gt; r=me
&gt; 
&gt; &gt; PerformanceTests/SunSpider/tests/sunspider-1.0/string-tagcloud.js:266
&gt; &gt; +var expectedMinLength = 315000;
&gt; 
&gt; How did you come up with this being enough in all cases?

The differences I observed on the various platforms and browsers I tested were never greater than ~20.  So I think this is much a much bigger tolerance than we need, based on empirical data.

But also, this is a comparison of string length.  The string length will only if Math.log returns a result that is in a different order of magnitude.  So I think that it would be hard for someone to have a Math.log function that is so wrong that you get 241 fewer digits in the string generated by tagcloud, than you would get in the systems I tested.

Finally, I&apos;d be happy to make this even more tolerant, if you or others think it&apos;s a good idea.  The point of this string compare at this point is just to force the JS engine to actually run the benchmark and generate the string - since you can only prove that the string wasn&apos;t shorter by actually running the thing.  (Well I guess the browser could still spoof the benchmark, in which case we can&apos;t really do anything; or the browser could solve the much harder combinatoric problem of proving that the string must be at least that big without actually running the code, but if the browser can solve that problem faster than running the code then I suppose such a browser deserves to be given an epic victory.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>878793</commentid>
    <comment_count>4</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-04-20 13:10:28 -0700</bug_when>
    <thetext>Landed in http://trac.webkit.org/changeset/148796</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>198923</attachid>
            <date>2013-04-19 19:09:24 -0700</date>
            <delta_ts>2013-04-20 06:50:18 -0700</delta_ts>
            <desc>the patch</desc>
            <filename>blah.patch</filename>
            <type>text/plain</type>
            <size>1560</size>
            <attacher name="Filip Pizlo">fpizlo</attacher>
            
              <data encoding="base64">SW5kZXg6IFBlcmZvcm1hbmNlVGVzdHMvU3VuU3BpZGVyL0NoYW5nZUxvZwo9PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0t
LSBQZXJmb3JtYW5jZVRlc3RzL1N1blNwaWRlci9DaGFuZ2VMb2cJKHJldmlzaW9uIDE0ODc4NikK
KysrIFBlcmZvcm1hbmNlVGVzdHMvU3VuU3BpZGVyL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpA
QCAtMSwzICsxLDEyIEBACisyMDEzLTA0LTE5ICBGaWxpcCBQaXpsbyAgPGZwaXpsb0BhcHBsZS5j
b20+CisKKyAgICAgICAgU3VuU3BpZGVyL3N0cmluZy10YWdjbG91ZCBzaG91bGQgYmUgbW9yZSBs
ZW5pZW50IGluIHZhbGlkYXRpbmcgaXRzIHJlc3VsdHMsIHNpbmNlIHRoZXkgZGVwZW5kIG9uIE1h
dGgubG9nLCB3aGljaCBpc24ndCBmb3JtYWxseSBzcGVjaWZpZWQKKyAgICAgICAgaHR0cHM6Ly9i
dWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTExNDg5NQorCisgICAgICAgIFJldmlld2Vk
IGJ5IE5PQk9EWSAoT09QUyEpLgorCisgIC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gKyBleHBlY3RlZExlbmd0aCArICIgYnV0IGdvdCAi
ICsgdGFnY2xvdWQubGVuZ3RoOworaWYgKHRhZ2Nsb3VkLmxlbmd0aCA8IGV4cGVjdGVkTWluTGVu
Z3RoKQorICAgIHRocm93ICJFUlJPUjogYmFkIHJlc3VsdDogZXhwZWN0ZWQgbGVuZ3RoIGF0IGxl
YXN0ICIgKyBleHBlY3RlZE1pbkxlbmd0aCArICIgYnV0IGdvdCAiICsgdGFnY2xvdWQubGVuZ3Ro
OwogCiB0YWdJbmZvID0gbnVsbDsK
</data>
<flag name="review"
          id="220607"
          type_id="1"
          status="+"
          setter="msaboff"
    />
          </attachment>
      

    </bug>

</bugzilla>