<?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>120015</bug_id>
          
          <creation_ts>2013-08-19 10:33:52 -0700</creation_ts>
          <short_desc>DFG 32Bit: Crash loading &quot;Classic&quot; site @ translate.google.com</short_desc>
          <delta_ts>2013-08-21 16:36:15 -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>translate.google.com</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="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>ggaren</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>918683</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-08-19 10:33:52 -0700</bug_when>
    <thetext>For 32 bit builds, loading the &quot;Classic&quot; page at translate.google.com crashes in 32 bit builds.

On iOS, the stack trace looks something like:
0   JavaScriptCore                	0x3085bf60 operationGetByValCell + 148 (WriteBarrier.h:103)
1   ???                           	0x25982d8c 0 + 630730124
2   JavaScriptCore                	0x307e5ef4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 52 (CallData.cpp:40)
3   JavaScriptCore                	0x308b35f2 JSC::functionProtoFuncCall(JSC::ExecState*) + 186 (FunctionPrototype.cpp:168)
4   ???                           	0x258971be 0 + 629764542
5   JavaScriptCore                	0x307e5ef4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 52 (CallData.cpp:40)
6   JavaScriptCore                	0x308b35f2 JSC::functionProtoFuncCall(JSC::ExecState*) + 186 (FunctionPrototype.cpp:168)
7   ???                           	0x258971be 0 + 629764542
8   JavaScriptCore                	0x307e5ef4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 52 (CallData.cpp:40)
9   JavaScriptCore                	0x308b35f2 JSC::functionProtoFuncCall(JSC::ExecState*) + 186 (FunctionPrototype.cpp:168)
10  ???                           	0x258971be 0 + 629764542
11  JavaScriptCore                	0x307e5ef4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 52 (CallData.cpp:40)
12  JavaScriptCore                	0x308b35f2 JSC::functionProtoFuncCall(JSC::ExecState*) + 186 (FunctionPrototype.cpp:168)
13  ???                           	0x258971be 0 + 629764542
14  JavaScriptCore                	0x307e5ef4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 52 (CallData.cpp:40)
15  JavaScriptCore                	0x308b34c8 JSC::functionProtoFuncApply(JSC::ExecState*) + 704 (FunctionPrototype.cpp:154)
16  ???                           	0x2589713e 0 + 629764414
17  JavaScriptCore                	0x308ba4a6 JSC::eval(JSC::ExecState*) + 926 (Interpreter.cpp:198)
18  JavaScriptCore                	0x309286ac llint_slow_path_call_eval + 224 (LLIntSlowPaths.cpp:1493)
19  JavaScriptCore                	0x3092d990 llint_op_call_eval + 12
20  JavaScriptCore                	0x307e5ef4 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 52 (CallData.cpp:40)
21  WebCore                       	0x37b8f57e WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 142 (JSMainThreadExecState.h:64)
22  WebCore                       	0x3775b656 WebCore::ScheduledAction::executeFunctionInContext(JSC::JSGlobalObject*, JSC::JSValue, WebCore::ScriptExecutionContext*) + 310 (ScheduledAction.cpp:111)
23  WebCore                       	0x3775b49c WebCore::ScheduledAction::execute(WebCore::Document*) + 108 (ScheduledAction.cpp:132)
24  WebCore                       	0x3775b298 WebCore::DOMTimer::fired() + 372 (DOMTimer.cpp:182)
25  WebCore                       	0x37717f4c WebCore::ThreadTimers::sharedTimerFiredInternal() + 132 (ThreadTimers.cpp:143)
26  WebCore                       	0x37717e9e WebCore::timerFired(__CFRunLoopTimer*, void*) + 22 (SharedTimerIOS.mm:62)
27  CoreFoundation                	0x2f7fa734 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12 (CFRunLoop.c:1604)
28  CoreFoundation                	0x2f7fa34a __CFRunLoopDoTimer + 778 (CFRunLoop.c:2090)

&lt;rdar://problem/14644548&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>918689</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-08-19 10:48:09 -0700</bug_when>
    <thetext>The javascript that triggers the problem is: function (){return this.Ad||(this.Ad=so+(this.mb.a++)[Xb](36))} and it&apos;s byte code is:
[   0] enter
[   1] convert_this      r-7
[   4] get_by_id         r0, r-7, Ad(@id0)
[  13] jtrue             r0, 86(-&gt;99)
[  16] mov               r1, r-7
[  19] resolve           r2, so(@id1), 284206064
[  24] get_by_id         r3, r-7, mb(@id2)
[  33] get_by_id         r4, r3, a(@id3)
[  42] to_number                 r5, r4
[  45] pre_inc           r4
[  47] put_by_id         r3, a(@id3), r4
[  56] resolve           r6, Xb(@id4), 284206076
[  61] get_by_val        r6, r5, r6    Original
[  67] mov               r8, r5
[  70] mov               r7, Int32: 36(@k0)
[  73] call      r6, 2, 15 status(Not Set)
[  79] call_put_result           r6
[  82] add               r2, r2, r6
[  87] put_by_id         r1, Ad(@id0), r2
[  96] mov               r0, r2
[  99] ret               r0

The IR for (this.mb.a++)[Xb], specifically the get_by_val for …[Xb] assumes that the object being index is a Cell, but the processing of (this.mb.a++) is predicting int.  Here are the two nodes in question:

34:           &lt; 4:8&gt;      GetByOffset(KnownCell:@31&lt;Final&gt;, JS|UseAsOther, id3{a}, 1, bc#33)  predicting Int

45:           &lt;!1:9&gt;      GetByVal(Check:Cell:@34&lt;Int32&gt;, @43&lt;String&gt;, JS|MustGen|MightClobber|UseAsOther|CanExit, GenericNonArrayInBoundsAsIs, bc#61)  predicting Function

SpeculativeJIT::fillSpeculateCell() in DFGSpeculativeJIT32_64.cpp doesn&apos;t check for values spilled as DataFormatInteger like the 64 bit version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>918821</commentid>
    <comment_count>2</comment_count>
      <attachid>209129</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-08-19 15:09:23 -0700</bug_when>
    <thetext>Created attachment 209129
Patch

Also cleaned up prior change log that inadvertently included the info from this change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>918822</commentid>
    <comment_count>3</comment_count>
      <attachid>209129</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2013-08-19 15:11:45 -0700</bug_when>
    <thetext>Comment on attachment 209129
Patch

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

&gt; Source/JavaScriptCore/ChangeLog:-13
&gt; -        * dfg/DFGSpeculativeJIT32_64.cpp:
&gt; -        (JSC::DFG::SpeculativeJIT::fillSpeculateCell):

?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>918825</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-08-19 15:23:30 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 209129 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=209129&amp;action=review
&gt; 
&gt; &gt; Source/JavaScriptCore/ChangeLog:-13
&gt; &gt; -        * dfg/DFGSpeculativeJIT32_64.cpp:
&gt; &gt; -        (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
&gt; 
&gt; ?

Like I said in the comment for the attachment.  I inadvertently added the changed files to a prior change log.  Hazards of handling an interrupting problem in the same checkout.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>918830</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2013-08-19 15:37:48 -0700</bug_when>
    <thetext>Committed r154303: &lt;http://trac.webkit.org/changeset/154303&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>919679</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2013-08-21 16:36:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/14802240&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>209129</attachid>
            <date>2013-08-19 15:09:23 -0700</date>
            <delta_ts>2013-08-19 15:11:45 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>120015.patch</filename>
            <type>text/plain</type>
            <size>1886</size>
            <attacher name="Michael Saboff">msaboff</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0N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ICAgICAgICAgICAgcmV0dXJuIGFsbG9j
YXRlKCk7CisgICAgICAgIH0KIAogICAgICAgICBpZiAoZWRnZS0+aGFzQ29uc3RhbnQoKSkgewog
ICAgICAgICAgICAgSlNWYWx1ZSBqc1ZhbHVlID0gdmFsdWVPZkpTQ29uc3RhbnQoZWRnZS5ub2Rl
KCkpOwo=
</data>
<flag name="review"
          id="231117"
          type_id="1"
          status="+"
          setter="oliver"
    />
          </attachment>
      

    </bug>

</bugzilla>