<?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>138497</bug_id>
          
          <creation_ts>2014-11-07 00:17:24 -0800</creation_ts>
          <short_desc>ASSERTION failed in get-by-pname.js when run with JSC_useLLINT=false and 2 other configurations</short_desc>
          <delta_ts>2016-06-06 23:31:09 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Mark Lam">mark.lam</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>joepeck</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1047033</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-11-07 00:17:24 -0800</bug_when>
    <thetext>The get_by_pname test changes in r175724 exposed some latent bugs that is bleeding the bots:
https://build.webkit.org/builders/Apple%20Yosemite%2032-bit%20JSC%20%28BuildAndTest%29?numbuilds=100

I confirmed that the issue has nothing to do with the fix in that change.  Here&apos;s a reduced test case that will illustrate the issue:
=== BEGIN test.js ===
function foo(o, v) {
    var result = 0;
    for (var n in o)
        result += v[n] ? v[n] : 0;
    return result;
}

var o = {a:1, b:3, c:7};
var a = [1, 2, 3];
var o1 = {&quot;1&quot;:1, &quot;2&quot;:3, &quot;3&quot;:7};

for (var i = 0; i &lt;= 1; i++) {
    foo(a, &apos;abc&apos;);
    foo(a, o);
    foo(a, o1);
}
=== END test.js ===

Run the test using jsc as follows:
$ JSC_useLLInt=0 DYLD_FRAMEWORK_PATH=/path/to/your/OpenSource/WebKitBuild/Debug/ WebKitBuild/Debug/jsc test.js</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047035</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-11-07 00:26:29 -0800</bug_when>
    <thetext>The test has been skipped in r175744: &lt;http://trac.webkit.org/r175744&gt;.

Will unskip when the fix is available.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047109</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-11-07 10:31:52 -0800</bug_when>
    <thetext>&lt;rdar://problem/18909792&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047113</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-11-07 10:44:49 -0800</bug_when>
    <thetext>If I disable the failed assertion, the useLLInt=false run does not crash.

Similarly, the another failing configuration:
... jsc --enableFunctionDotArguments=true --testTheFTL=true --useFTLJIT=true --enableExperimentalFTLCoverage=true --enableConcurrentJIT=false --thresholdForJITAfterWarmUp=100 --thresholdForJITAfterWarmUp=10 --thresholdForJITSoon=10 --thresholdForOptimizeAfterWarmUp=20 --thresholdForOptimizeAfterLongWarmUp=20 --thresholdForOptimizeSoon=20 --thresholdForFTLOptimizeAfterWarmUp=20 --thresholdForFTLOptimizeSoon=20 LayoutTests/resources/standalone-pre.js LayoutTests/js/script-tests/get-by-pname.js

... doe not crash with the failed assertion disabled.

Ditto with the 3rd configuration:
... jsc --useFTLJIT=false --enableFunctionDotArguments=true --enableConcurrentJIT=false --thresholdForJITAfterWarmUp=100 --thresholdForJITAfterWarmUp=10 --thresholdForJITSoon=10 --thresholdForOptimizeAfterWarmUp=20 --thresholdForOptimizeAfterLongWarmUp=20 --thresholdForOptimizeSoon=20 --thresholdForFTLOptimizeAfterWarmUp=20 --thresholdForFTLOptimizeSoon=20 LayoutTests/resources/standalone-pre.js LayoutTests/js/script-tests/get-by-pname.js

This could very well just be a case of a bad assertion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047114</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-11-07 10:48:54 -0800</bug_when>
    <thetext>Just confirmed that the failures were only on debug builds where assertions are enabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1047119</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2014-11-07 11:02:09 -0800</bug_when>
    <thetext>The eager FTL configuration did have a different more serious looking assertion failure once I disable the one in operationGetByValDefault().  This other assertion is:

DFG ASSERTION FAILED: Edge verification error: @109-&gt;Check:Cell:@9 was expected to have type Cell but has type Int32 (2097152)
/Volumes/Data/ws5/OpenSource/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h(112) : void JSC::DFG::AbstractInterpreter&lt;JSC::DFG::InPlaceAbstractState&gt;::verifyEdge(JSC::DFG::Node *, JSC::DFG::Edge) [AbstractStateType = JSC::DFG::InPlaceAbstractState]
1   0x10099de90 WTFCrashWithSecurityImplication
2   0x1003016e3 JSC::DFG::crash(JSC::DFG::Graph&amp;, WTF::CString const&amp;, char const*, int, char const*, char const*)
3   0x10030175b JSC::DFG::Graph::handleAssertionFailure(JSC::DFG::Node*, char const*, int, char const*, char const*)
4   0x100249734 JSC::DFG::AbstractInterpreter&lt;JSC::DFG::InPlaceAbstractState&gt;::verifyEdge(JSC::DFG::Node*, JSC::DFG::Edge)
5   0x100244406 JSC::DFG::AbstractInterpreter&lt;JSC::DFG::InPlaceAbstractState&gt;::verifyEdges(JSC::DFG::Node*)
6   0x100239ad5 JSC::DFG::AbstractInterpreter&lt;JSC::DFG::InPlaceAbstractState&gt;::executeEffects(unsigned int, JSC::DFG::Node*)
7   0x1003b7643 JSC::DFG::AbstractInterpreter&lt;JSC::DFG::InPlaceAbstractState&gt;::executeEffects(unsigned int)
8   0x10049e767 JSC::FTL::LowerDFGToLLVM::compileNode(unsigned int)
9   0x10049db81 JSC::FTL::LowerDFGToLLVM::compileBlock(JSC::DFG::BasicBlock*)
10  0x10049bcc8 JSC::FTL::LowerDFGToLLVM::lower()
11  0x10049926e JSC::FTL::lowerDFGToLLVM(JSC::FTL::State&amp;)
12  0x10038c71b JSC::DFG::Plan::compileInThreadImpl(JSC::DFG::LongLivedState&amp;)
13  0x10038b826 JSC::DFG::Plan::compileInThread(JSC::DFG::LongLivedState&amp;, JSC::DFG::ThreadData*)
14  0x1002e3333 JSC::DFG::compileImpl(JSC::VM&amp;, JSC::CodeBlock*, JSC::CodeBlock*, JSC::DFG::CompilationMode, unsigned int, JSC::Operands&lt;JSC::JSValue, JSC::OperandValueTraits&lt;JSC::JSValue&gt; &gt; const&amp;, WTF::PassRefPtr&lt;JSC::DeferredCompilationCallback&gt;)
15  0x1002e2ce4 JSC::DFG::compile(JSC::VM&amp;, JSC::CodeBlock*, JSC::CodeBlock*, JSC::DFG::CompilationMode, unsigned int, JSC::Operands&lt;JSC::JSValue, JSC::OperandValueTraits&lt;JSC::JSValue&gt; &gt; const&amp;, WTF::PassRefPtr&lt;JSC::DeferredCompilationCallback&gt;)
16  0x10035291a JSC::DFG::triggerFTLReplacementCompile(JSC::VM*, JSC::CodeBlock*, JSC::DFG::JITCode*)
17  0x1003526bc triggerTierUpNow
18  0x5864f8e362cd
19  0x5864f8e2f6f1
20  0x100767869 vmEntryToJavaScript
21  0x1005f521a JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
22  0x1005d6806 JSC::Interpreter::execute(JSC::EvalExecutable*, JSC::ExecState*, JSC::JSValue, JSC::JSScope*)
23  0x1005d5e64 JSC::eval(JSC::ExecState*)
24  0x100605f7d operationCallEval
25  0x5864f8e15ee5
26  0x100767869 vmEntryToJavaScript
27  0x1005f521a JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
28  0x1005d9a54 JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::JSObject*)
29  0x100176cd0 JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&amp;, JSC::JSValue, JSC::JSValue*)
30  0x100001d54 runWithScripts(GlobalObject*, WTF::Vector&lt;Script, 0ul, WTF::CrashOnOverflow&gt; const&amp;, bool)
31  0x1000013cb jscmain(int, char**)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199900</commentid>
    <comment_count>6</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-06-06 21:56:13 -0700</bug_when>
    <thetext>Mark, this test appears to pass for me in Release and Debug. Should we try unskipping the test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199904</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2016-06-06 22:21:55 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Mark, this test appears to pass for me in Release and Debug. Should we try
&gt; unskipping the test?

Let&apos;s unskip the test.  The FTL also uses B3 now.  So things have changed a lot.  Let&apos;s give it a try.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199914</commentid>
    <comment_count>8</comment_count>
      <attachid>280674</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2016-06-06 22:41:43 -0700</bug_when>
    <thetext>Created attachment 280674
[PATCH] Proposed Fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199915</commentid>
    <comment_count>9</comment_count>
      <attachid>280674</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2016-06-06 22:42:21 -0700</bug_when>
    <thetext>Comment on attachment 280674
[PATCH] Proposed Fix

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199947</commentid>
    <comment_count>10</comment_count>
      <attachid>280674</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-06-06 23:31:05 -0700</bug_when>
    <thetext>Comment on attachment 280674
[PATCH] Proposed Fix

Clearing flags on attachment: 280674

Committed r201744: &lt;http://trac.webkit.org/changeset/201744&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1199948</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-06-06 23:31:09 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>280674</attachid>
            <date>2016-06-06 22:41:43 -0700</date>
            <delta_ts>2016-06-06 23:31:05 -0700</delta_ts>
            <desc>[PATCH] Proposed Fix</desc>
            <filename>unskip-3.patch</filename>
            <type>text/plain</type>
            <size>1051</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0xheW91dFRlc3RzL0NoYW5nZUxvZyBiL0xheW91dFRlc3RzL0NoYW5nZUxv
ZwppbmRleCBlMTk5ZTVhLi43MTkyYTljIDEwMDY0NAotLS0gYS9MYXlvdXRUZXN0cy9DaGFuZ2VM
b2cKKysrIGIvTGF5b3V0VGVzdHMvQ2hhbmdlTG9nCkBAIC0xLDUgKzEsMTYgQEAKIDIwMTYtMDYt
MDYgIEpvc2VwaCBQZWNvcmFybyAgPHBlY29yYXJvQGFwcGxlLmNvbT4KIAorICAgICAgICBBU1NF
UlRJT04gZmFpbGVkIGluIGdldC1ieS1wbmFtZS5qcyB3aGVuIHJ1biB3aXRoIEpTQ191c2VMTElO
VD1mYWxzZSBhbmQgMiBvdGhlciBjb25maWd1cmF0aW9uc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