<?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>160291</bug_id>
          
          <creation_ts>2016-07-28 04:57:35 -0700</creation_ts>
          <short_desc>[ARM] REGRESSION(r203786): jit.m_assembler.buffer().codeSize() &lt;= static_cast&lt;size_t&gt;(m_inlineSize)</short_desc>
          <delta_ts>2016-07-31 14:09:10 -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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>108645</blocked>
    
    <blocked>160110</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1215211</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-07-28 04:57:35 -0700</bug_when>
    <thetext>https://trac.webkit.org/changeset/203786 changed the IC code and made zillion tests assert/crash again. :(
Before r203786, almost all tests passed with the patch in https://bugs.webkit.org/show_bug.cgi?id=159720 .
But after r203786 I got the following assert:

ASSERTION FAILED: jit.m_assembler.buffer().codeSize() &lt;= static_cast&lt;size_t&gt;(m_inlineSize)
../../Source/JavaScriptCore/jit/JITMathIC.h(135) : JSC::JITMathIC&lt;Generator&gt;::generateOutOfLine(JSC::VM&amp;, JSC::CodeBlock*, JSC::FunctionPtr)::&lt;lambda()&gt; [with GeneratorType = JSC::JITAddGenerator]
1   0xb64318e0 WTFCrash
2   0xb5f3efb8 JSC::JITMathIC&lt;JSC::JITAddGenerator&gt;::generateOutOfLine(JSC::VM&amp;, JSC::CodeBlock*, JSC::FunctionPtr)::{lambda()#1}::operator()() const
3   0xb5f3f438 JSC::JITMathIC&lt;JSC::JITAddGenerator&gt;::generateOutOfLine(JSC::VM&amp;, JSC::CodeBlock*, JSC::FunctionPtr)
4   0xb5f35d1c
Segmentation fault

---
jit.m_assembler.buffer().codeSize() = 12
static_cast&lt;size_t&gt;(m_inlineSize) = 4

Could you give me some hint what changed here? 
Why isn&apos;t there enough space to use ldr + b + immediate (12 bytes) for jump?

Could you share me how long will you work refactoring this IC thing?
I won&apos;t have time to fix new and new regressions every day. Maybe I 
simply let ARMAssembler completely broken until you finish this 
development, and then try to debug all regression. Maybe let it
broken forever, who knows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1215964</commentid>
    <comment_count>1</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-07-31 14:09:10 -0700</bug_when>
    <thetext>I think this is covered by your other work arounds. Do you agree?
I think this all comes down to the arm assembler predictably patching
over code with similar code of the same size. I&apos;m not sure what&apos;s
involved in the constant pool flushing work to make this all work.
It&apos;s possible for now, as I commented in your other bug, to have
traditional arm assembler just fall back to old Math behavior for add/mul/etc.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>