<?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>79555</bug_id>
          
          <creation_ts>2012-02-24 20:34:08 -0800</creation_ts>
          <short_desc>JSString::resolveRope() should report extra memory cost to heap</short_desc>
          <delta_ts>2012-06-22 11:04:40 -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>JavaScriptCore</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></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yong Li">yong.li.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barraclough</cc>
    
    <cc>ggaren</cc>
    
    <cc>loki</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>ossy</cc>
    
    <cc>pnormand</cc>
    
    <cc>pvarga</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>zherczeg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>564847</commentid>
    <comment_count>0</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-24 20:34:08 -0800</bug_when>
    <thetext>JSString::resolveRope() should report extra memory cost to heap, otherwise, it can silently boost memory usage but never trigger a GC.

Patch is forthcoming</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>564848</commentid>
    <comment_count>1</comment_count>
      <attachid>128845</attachid>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-24 20:42:15 -0800</bug_when>
    <thetext>Created attachment 128845
the patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>565693</commentid>
    <comment_count>2</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-27 08:57:06 -0800</bug_when>
    <thetext>BTW, I know the fibers will be cleared when rope is resolved. However the fibers are also JSString. Even they are the only owners of the string buffers, those string buffers won&apos;t be released until next GC. So it is even more necessary to notify heap for the new memory cost.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>565976</commentid>
    <comment_count>3</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-02-27 14:15:51 -0800</bug_when>
    <thetext>This looks correct to me, but I&apos;d like to see performance results before saying r+.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>565992</commentid>
    <comment_count>4</comment_count>
      <attachid>129102</attachid>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-27 14:51:30 -0800</bug_when>
    <thetext>Created attachment 129102
a test case (just load it in Safari)

A test case that shows how bad this issue can be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>565995</commentid>
    <comment_count>5</comment_count>
      <attachid>129102</attachid>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-27 14:54:56 -0800</bug_when>
    <thetext>Comment on attachment 129102
a test case (just load it in Safari)

sorry this isn&apos;t right</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>565999</commentid>
    <comment_count>6</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-02-27 15:03:02 -0800</bug_when>
    <thetext>What I meant was performance results from running Tools/Scripts/bencher.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>566063</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2012-02-27 16:07:09 -0800</bug_when>
    <thetext>I ran bencher with the change:

VMs tested:
&quot;Baseline&quot; at /Volumes/Data/src/webkit.baseline/WebKitBuild/Release/jsc (r109029)
&quot;With79555&quot; at /Volumes/Data/src/webkit/WebKitBuild/Release/jsc (r109029)

Collected 12 samples per benchmark/VM, with 4 VM invocations per benchmark. Emitted a call to gc() between sample
measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used the jsc-specific preciseTime()
function to get microsecond-level timing. Reporting benchmark execution times with 95% confidence intervals in
milliseconds.

                                             Baseline               With79555                                    
SunSpider:
   3d-cube                                5.8065+-0.0636          5.7976+-0.0348       
   3d-morph                               9.7651+-0.0655          9.7475+-0.0584       
   3d-raytrace                            7.8058+-0.0845          7.7804+-0.1359       
   access-binary-trees                    1.6814+-0.0083    ?     1.6891+-0.0117       ?
   access-fannkuch                        7.4542+-0.0378    ?     7.4615+-0.0387       ?
   access-nbody                           3.8650+-0.0121    ?     3.8658+-0.0083       ?
   access-nsieve                          3.4944+-0.0348    ?     3.4945+-0.0369       ?
   bitops-3bit-bits-in-byte               1.2890+-0.0116          1.2827+-0.0024       
   bitops-bits-in-byte                    5.2574+-0.0148    ?     5.2639+-0.0279       ?
   bitops-bitwise-and                     3.3042+-0.0109          3.3022+-0.0062       
   bitops-nsieve-bits                     3.3366+-0.0121          3.3241+-0.0027       
   controlflow-recursive                  2.3364+-0.0095    ?     2.3375+-0.0161       ?
   crypto-aes                             7.5264+-0.0598    ?     7.5782+-0.0733       ?
   crypto-md5                             2.8876+-0.0368          2.8643+-0.0226       
   crypto-sha1                            2.4409+-0.0311          2.4334+-0.0269       
   date-format-tofte                     11.0680+-0.1543         10.8679+-0.0523         might be 1.0184x faster
   date-format-xparb                     10.3282+-0.1265    !    10.8125+-0.2257       ! definitely 1.0469x slower
   math-cordic                            7.5014+-0.0586    ?     7.5187+-0.0581       ?
   math-partial-sums                     10.5861+-0.0533    ?    10.5951+-0.0332       ?
   math-spectral-norm                     2.6737+-0.0134          2.6717+-0.0041       
   regexp-dna                             8.9740+-0.0569    ?     9.0282+-0.0640       ?
   string-base64                          4.3738+-0.0134    ?     4.3838+-0.0200       ?
   string-fasta                           7.2748+-0.0436    ?     7.2940+-0.0623       ?
   string-tagcloud                       12.8811+-0.0680    !    13.0507+-0.0959       ! definitely 1.0132x slower
   string-unpack-code                    22.0923+-0.1550         21.9631+-0.1851       
   string-validate-input                  6.5372+-0.0665          6.4888+-0.0790       

   &lt;arithmetic&gt; *                         6.6362+-0.0224    ?     6.6499+-0.0168       ? might be 1.0021x slower
   &lt;geometric&gt;                            5.3565+-0.0173    ?     5.3622+-0.0106       ? might be 1.0011x slower
   &lt;harmonic&gt;                             4.2590+-0.0164          4.2576+-0.0088         might be 1.0003x faster

                                             Baseline               With79555                                    
V8:
   crypto                                75.2921+-0.2420         75.1662+-0.2582       
   deltablue                            159.3357+-1.0798        158.7000+-0.7260       
   earley-boyer                          99.7900+-0.4689    ?   100.4316+-0.6263       ?
   raytrace                              52.0263+-0.3561    ?    52.2842+-0.5627       ?
   regexp                               101.9057+-0.4743    ?   102.1308+-0.4548       ?
   richards                             145.3947+-1.1873        144.3771+-1.0141       
   splay                                 59.5547+-0.2939         59.2430+-0.2968       

   &lt;arithmetic&gt;                          99.0427+-0.2055         98.9047+-0.1527         might be 1.0014x faster
   &lt;geometric&gt; *                         91.8010+-0.1860         91.7429+-0.1588         might be 1.0006x faster
   &lt;harmonic&gt;                            85.0683+-0.1982         85.0617+-0.1961         might be 1.0001x faster

                                             Baseline               With79555                                    
Kraken:
   ai-astar                             809.4562+-13.3802   ?   821.8329+-11.7089      ? might be 1.0153x slower
   audio-beat-detection                 192.9189+-2.0074    ^   190.4819+-0.3250       ^ definitely 1.0128x faster
   audio-dft                            291.9583+-4.6616        289.0048+-2.0882         might be 1.0102x faster
   audio-fft                            116.8073+-0.1773    ?   116.8932+-0.6872       ?
   audio-oscillator                     301.8988+-1.1253        301.6176+-1.3546       
   imaging-darkroom                     293.9836+-6.5322    ?   296.2939+-6.6740       ?
   imaging-desaturate                   237.5340+-0.2004    ^   237.1890+-0.1405       ^ definitely 1.0015x faster
   imaging-gaussian-blur                455.1080+-0.1737    ?   455.4429+-0.3213       ?
   json-parse-financial                  64.0643+-0.1497    ^    63.2265+-0.2037       ^ definitely 1.0133x faster
   json-stringify-tinderbox              76.9872+-0.4034    ?    77.1329+-0.3894       ?
   stanford-crypto-aes                  104.1311+-0.9987        102.9684+-0.6176         might be 1.0113x faster
   stanford-crypto-ccm                  100.6942+-0.6070        100.4644+-0.6231       
   stanford-crypto-pbkdf2               200.0193+-0.7368    ?   200.7508+-0.6206       ?
   stanford-crypto-sha256-iterative      90.7559+-0.4278         90.5753+-0.2473       

   &lt;arithmetic&gt; *                       238.3083+-1.0552    ?   238.8482+-0.9982       ? might be 1.0023x slower
   &lt;geometric&gt;                          183.1813+-0.5011        182.8738+-0.3854         might be 1.0017x faster
   &lt;harmonic&gt;                           146.3076+-0.3062    ^   145.7417+-0.2077       ^ definitely 1.0039x faster

                                             Baseline               With79555                                    
All benchmarks:
   &lt;arithmetic&gt;                          89.4076+-0.3439    ?    89.5554+-0.2991       ? might be 1.0017x slower
   &lt;geometric&gt;                           23.4206+-0.0635         23.4204+-0.0390         might be 1.0000x faster
   &lt;harmonic&gt;                             7.4808+-0.0283          7.4781+-0.0153         might be 1.0004x faster

                                             Baseline               With79555                                    
Geomean of preferred means:
   &lt;scaled-result&gt;                       52.5575+-0.1566    ?    52.6220+-0.1053       ? might be 1.0012x slower

It appears that there is a slight slowdown in sun spider.string-tagcloud (~1%).  I verified there was a slowdown for tagclound os ~1% using run-sunspider harness.  Overall this has a .1% impact on sun spider or all three tests, within the noise band.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>566618</commentid>
    <comment_count>8</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-28 06:49:20 -0800</bug_when>
    <thetext>I was just going to do it this morning, but already see the performance results :). Thanks a lot!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>566685</commentid>
    <comment_count>9</comment_count>
      <attachid>128845</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-28 08:02:22 -0800</bug_when>
    <thetext>Comment on attachment 128845
the patch

Clearing flags on attachment: 128845

Committed r109105: &lt;http://trac.webkit.org/changeset/109105&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>566686</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-28 08:02:29 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>567007</commentid>
    <comment_count>11</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-02-28 13:07:24 -0800</bug_when>
    <thetext>Reopen, because it broke fast/events/dispatch-message-string-data.html on Qt and on GTK: 

--- /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-expected.txt 
+++ /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-actual.txt 
@@ -1,4 +1,5 @@
 This is a test for https://bugs.webkit.org/show_bug.cgi?id=71229 (V8MessageEvent::dataAccessorGetter does not return a reference to its caller). If it succeeds, DONE will appear below. If it fails, you should see messages containing unexpected strings that were received and/or a renderer crash.
 
 DONE
+Expected &apos;818&apos;, Got: &apos;HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello818&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>567106</commentid>
    <comment_count>12</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-28 14:33:25 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; Reopen, because it broke fast/events/dispatch-message-string-data.html on Qt and on GTK: 
&gt; 
&gt; --- /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-expected.txt 
&gt; +++ /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-actual.txt 
&gt; @@ -1,4 +1,5 @@
&gt;  This is a test for https://bugs.webkit.org/show_bug.cgi?id=71229 (V8MessageEvent::dataAccessorGetter does not return a reference to its caller). If it succeeds, DONE will appear below. If it fails, you should see messages containing unexpected strings that were received and/or a renderer crash.
&gt; 
&gt;  DONE
&gt; +Expected &apos;818&apos;, Got: 

This must be an existing issue but triggered by this patch. heap-&gt;reportExtraMemoryCost(n) shouldn&apos;t be problem no matter how much n is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>567119</commentid>
    <comment_count>13</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-28 14:45:16 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; Reopen, because it broke fast/events/dispatch-message-string-data.html on Qt and on GTK: 
&gt; 
&gt; --- /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-expected.txt 
&gt; +++ /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-actual.txt 
&gt; @@ -1,4 +1,5 @@
&gt;  This is a test for https://bugs.webkit.org/show_bug.cgi?id=71229 (V8MessageEvent::dataAccessorGetter does not return a reference to its caller). If it succeeds, DONE will appear below. If it fails, you should see messages containing unexpected strings that were received and/or a renderer crash.
&gt; 
&gt;  DONE
&gt; +Expected &apos;818&apos;, Got: &apos;Hello...


It is 1024 &quot;Hello&quot;s + 808.

The JS:

var kPrefix = &quot;Hello&quot;;
for (var i = 0; i &lt; 10; ++i)
    kPrefix += kPrefix;

2^10 = 1024

    if (message_event.data !== kPrefix + num.toString()) {
        log(&quot;Expected &apos;&quot; + num + &quot;&apos;, Got: &apos;&quot; + message_event.data + &quot;&apos;&quot;);
    }

So the message_event.data seems right.

what&apos;s &quot;!==&quot;? is it a supported operator in JS?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>567122</commentid>
    <comment_count>14</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-28 14:48:16 -0800</bug_when>
    <thetext>Never mind.

    if (message_event.data !== kPrefix + num.toString()) {

Probably &quot;kPrefix + num.toString()&quot; got GC&apos;ed...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>567238</commentid>
    <comment_count>15</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2012-02-28 17:03:04 -0800</bug_when>
    <thetext>&gt; This must be an existing issue but triggered by this patch.

Not necessarily. For example, you may have introduced a garbage collection at a time when your string is in an invalid state.

If you don&apos;t have any immediate debugging leads, I think the best next step is to roll the patch out and rework it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>567474</commentid>
    <comment_count>16</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-02-29 00:51:58 -0800</bug_when>
    <thetext>I skipped it on Qt to paint the bot green - http://trac.webkit.org/changeset/109202 . Please unskip it once the bug is fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>567585</commentid>
    <comment_count>17</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-29 07:10:00 -0800</bug_when>
    <thetext>(In reply to comment #15)
&gt; &gt; This must be an existing issue but triggered by this patch.
&gt; 
&gt; Not necessarily. For example, you may have introduced a garbage collection at a time when your string is in an invalid state.
&gt; 
&gt; If you don&apos;t have any immediate debugging leads, I think the best next step is to roll the patch out and rework it.

If that is true, it is a serious problem. I&apos;ll try to fix it today. I&apos;m not against rolling it out if it is necessary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>567731</commentid>
    <comment_count>18</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-02-29 10:52:27 -0800</bug_when>
    <thetext>(In reply to comment #16)
&gt; I skipped it on Qt to paint the bot green - http://trac.webkit.org/changeset/109202 . Please unskip it once the bug is fixed.

Thanks, Csaba. However I cannot reproduce the problem even by reporting 64MB memory cost which for sure triggers a GC. This might be port-specific issue. I&apos;ll try to make a qt build, but probably it will take me some time. Do you know any qt/gtk webkit developer available to help investigating this issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>568803</commentid>
    <comment_count>19</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-03-01 11:58:32 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; Reopen, because it broke fast/events/dispatch-message-string-data.html on Qt and on GTK: 
&gt; 
&gt; --- /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-expected.txt 
&gt; +++ /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-actual.txt 
&gt; @@ -1,4 +1,5 @@
&gt;  This is a test for https://bugs.webkit.org/show_bug.cgi?id=71229 (V8MessageEvent::dataAccessorGetter does not return a reference to its caller). If it succeeds, DONE will appear below. If it fails, you should see messages containing unexpected strings that were received and/or a renderer crash.
&gt; 
&gt;  DONE
&gt; +Expected &apos;818&apos;, Got: 
..

Csaba, finally we got Qt 5.0 webkit release build on ubuntu (32-bit), but it passed the test, even after I made it reportExtraCost(64*1024*1024). Given that the issue cannot be produced on either ubuntu 32-bit or QNX, I tend to suggest it is a platform/port specific GC issue, probably something related to stack walking code, and probably related to 64-bit linux.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>569331</commentid>
    <comment_count>20</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2012-03-01 23:45:42 -0800</bug_when>
    <thetext>The very same failure happens on GTK bots as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>569525</commentid>
    <comment_count>21</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-03-02 04:13:45 -0800</bug_when>
    <thetext>(In reply to comment #19)
&gt; (In reply to comment #11)
&gt; &gt; Reopen, because it broke fast/events/dispatch-message-string-data.html on Qt and on GTK: 
&gt; &gt; 
&gt; &gt; --- /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-expected.txt 
&gt; &gt; +++ /ramdisk/qt-linux-64-release/build/layout-test-results/fast/events/dispatch-message-string-data-actual.txt 
&gt; &gt; @@ -1,4 +1,5 @@
&gt; &gt;  This is a test for https://bugs.webkit.org/show_bug.cgi?id=71229 (V8MessageEvent::dataAccessorGetter does not return a reference to its caller). If it succeeds, DONE will appear below. If it fails, you should see messages containing unexpected strings that were received and/or a renderer crash.
&gt; &gt; 
&gt; &gt;  DONE
&gt; &gt; +Expected &apos;818&apos;, Got: 
&gt; ..
&gt; 
&gt; Csaba, finally we got Qt 5.0 webkit release build on ubuntu (32-bit), but it passed the test, even after I made it reportExtraCost(64*1024*1024). Given that the issue cannot be produced on either ubuntu 32-bit or QNX, I tend to suggest it is a platform/port specific GC issue, probably something related to stack walking code, and probably related to 64-bit linux.

Sorry, I didn&apos;t realize that this test fails only on 64 bit 
(Qt, GTK too), but pass on 32 bit. And tested with Qt 4.8.0.
But I think it should fail with Qt 5 on 64 bit too. I&apos;ll check
it later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>569659</commentid>
    <comment_count>22</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-03-02 08:19:14 -0800</bug_when>
    <thetext>(In reply to comment #20)
&gt; The very same failure happens on GTK bots as well.

Is it also 64-bit linux? There isn&apos;t difference between QT and GTK in JS engine as long as the OS and CPU are same. I tried the instructions of building GTK port. But it fails &quot;due to non buildable&quot; gdk-pixbuf and other libs. Any idea?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>569666</commentid>
    <comment_count>23</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2012-03-02 08:32:31 -0800</bug_when>
    <thetext>(In reply to comment #22)
&gt; (In reply to comment #20)
&gt; &gt; The very same failure happens on GTK bots as well.
&gt; 
&gt; Is it also 64-bit linux? There isn&apos;t difference between QT and GTK in JS engine as long as the OS and CPU are same. I tried the instructions of building GTK port. But it fails &quot;due to non buildable&quot; gdk-pixbuf and other libs. Any idea?

Yes, I think it was only happening on the 2 64-bit GTK bots.
For your build issues maybe we can discuss on IRC? My nickname is philn-tp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>569816</commentid>
    <comment_count>24</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-03-02 11:53:11 -0800</bug_when>
    <thetext>Actually reporting 64MB cost doesn&apos;t always trigger GC. We modified reportExtraMemoryCostSlowCase() to always do a GC instead. And we cannot see any problem on Mac 64-bit (Safari), Linux 32-bit (Qt) and QNX. (Many thanks to Jacky Jiang&apos;s help for making qtwebkit build on linux and safari build on Mac.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>643538</commentid>
    <comment_count>25</comment_count>
    <who name="Yong Li">yong.li.webkit</who>
    <bug_when>2012-06-07 07:30:08 -0700</bug_when>
    <thetext>Can someone who (In reply to comment #23)
&gt; (In reply to comment #22)
&gt; &gt; (In reply to comment #20)
&gt; &gt; &gt; The very same failure happens on GTK bots as well.
&gt; &gt; 
&gt; &gt; Is it also 64-bit linux? There isn&apos;t difference between QT and GTK in JS engine as long as the OS and CPU are same. I tried the instructions of building GTK port. But it fails &quot;due to non buildable&quot; gdk-pixbuf and other libs. Any idea?
&gt; 
&gt; Yes, I think it was only happening on the 2 64-bit GTK bots.
&gt; For your build issues maybe we can discuss on IRC? My nickname is philn-tp.

Is this problem still happening?

There seems to be a pthread mutex issue on some 64bit linux, which I think can lead to any kind of weird crash.

https://bugs.webkit.org/show_bug.cgi?id=88419

Could you try this change (suggested by Joe)?

&gt; As a quick hack, try changing &quot;PlatformMutex m_mutex;&quot; in 
&gt; ThreadingPrimitives.h to &quot;WTF_ALIGNED(PlatformMutex, m_mutex, 64);&quot;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>128845</attachid>
            <date>2012-02-24 20:42:15 -0800</date>
            <delta_ts>2012-02-28 08:02:22 -0800</delta_ts>
            <desc>the patch</desc>
            <filename>79555.patch</filename>
            <type>text/plain</type>
            <size>2086</size>
            <attacher name="Yong Li">yong.li.webkit</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9KY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QpAQCAtOTIsOSArOTMsMTAgQEAgdm9pZCBKU1N0cmluZzo6
cmVzb2x2ZVJvcGUoRXhlY1N0YXRlKiBleGVjKSBjb25zdAogICAgIH0KIAogICAgIFVDaGFyKiBi
dWZmZXI7Ci0gICAgaWYgKFJlZlB0cjxTdHJpbmdJbXBsPiBuZXdJbXBsID0gU3RyaW5nSW1wbDo6
dHJ5Q3JlYXRlVW5pbml0aWFsaXplZChtX2xlbmd0aCwgYnVmZmVyKSkKKyAgICBpZiAoUmVmUHRy
PFN0cmluZ0ltcGw+IG5ld0ltcGwgPSBTdHJpbmdJbXBsOjp0cnlDcmVhdGVVbmluaXRpYWxpemVk
KG1fbGVuZ3RoLCBidWZmZXIpKSB7CisgICAgICAgIEhlYXA6OmhlYXAodGhpcyktPnJlcG9ydEV4
dHJhTWVtb3J5Q29zdChuZXdJbXBsLT5jb3N0KCkpOwogICAgICAgICBtX3ZhbHVlID0gbmV3SW1w
bC5yZWxlYXNlKCk7Ci0gICAgZWxzZSB7CisgICAgfSBlbHNlIHsKICAgICAgICAgb3V0T2ZNZW1v
cnkoZXhlYyk7CiAgICAgICAgIHJldHVybjsKICAgICB9Cg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>129102</attachid>
            <date>2012-02-27 14:51:30 -0800</date>
            <delta_ts>2012-02-27 14:54:56 -0800</delta_ts>
            <desc>a test case (just load it in Safari)</desc>
            <filename>creatstrings.html</filename>
            <type>text/html</type>
            <size>407</size>
            <attacher name="Yong Li">yong.li.webkit</attacher>
            
              <data encoding="base64">PGh0bWw+Cjxib2R5Pgo8cCBpZD0ibnVtYmVyIj48L3A+CjxzY3JpcHQ+CnZhciBzMSA9ICJhYWFh
YSI7CndoaWxlIChzMS5sZW5ndGggPCAxMDI0KQogICAgczEgKz0gczE7CnZhciBzMiA9IHMxOwpm
dW5jdGlvbiBtYWtlTmV3U3RyaW5nKCkKewogICAgdmFyIHN0YXJ0ID0gbmV3IERhdGUoKTsKICAg
IGRvIHsKICAgICAgICBzMiA9IHMxICsgczI7CiAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5
SWQoIm51bWJlciIpLmlubmVySFRNTCA9IHMyLnN1YnN0cmluZygyMCwgMzApOwogICAgfSB3aGls
ZSAobmV3IERhdGUoKSAtIHN0YXJ0IDwgNTAwMCk7CiAgICBzZXRUaW1lb3V0KG1ha2VOZXdTdHJp
bmcsIDApOwp9CnNldFRpbWVvdXQobWFrZU5ld1N0cmluZywgMCk7Cjwvc2NyaXB0Pgo8L2JvZHk+
CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>