<?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>165651</bug_id>
          
          <creation_ts>2016-12-09 03:34:07 -0800</creation_ts>
          <short_desc>REGRESSION(r208791): Assertion in testb3</short_desc>
          <delta_ts>2016-12-10 01:29:42 -0800</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>RESOLVED</bug_status>
          <resolution>FIXED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Keith Miller">keith_miller</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>ossy</cc>
    
    <cc>saam</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1258116</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-12-09 03:34:07 -0800</bug_when>
    <thetext>ASSERTION FAILED: compileAndRun&lt;uint32_t&gt;(proc, a, b) == a / b (compileAndRun&lt;uint32_t&gt;(proc, a, b) == 1, a / b == 0)
../../Source/JavaScriptCore/b3/testb3.cpp(1775) : void {anonymous}::testUDivArgsInt32(uint32_t, uint32_t)

I don&apos;t know if it is a regression or not, I haven&apos;t run testb3 in the last months. I don&apos;t 
know if it is Linux specific or not, I don&apos;t have any chance to test on non Linux environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258117</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-12-09 03:40:59 -0800</bug_when>
    <thetext>ASSERTION FAILED: compileAndRun&lt;uint64_t&gt;(proc, a, b) == a / b (compileAndRun&lt;uint64_t&gt;(proc, a, b) == 1, a / b == 0)
../../Source/JavaScriptCore/b3/testb3.cpp(1791) : void {anonymous}::testUDivArgsInt64(uint64_t, uint64_t)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258118</commentid>
    <comment_count>2</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-12-09 04:00:31 -0800</bug_when>
    <thetext>Just a note, this test was added by https://trac.webkit.org/changeset/208781</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258119</commentid>
    <comment_count>3</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-12-09 04:01:58 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Just a note, this test was added by https://trac.webkit.org/changeset/208781

It must be a regression, because it passed when it was added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258121</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-12-09 04:47:25 -0800</bug_when>
    <thetext>I bisected, it is definitely a regression caused by https://trac.webkit.org/changeset/208791 .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258141</commentid>
    <comment_count>5</comment_count>
    <who name="Keith Miller">keith_miller</who>
    <bug_when>2016-12-09 09:01:49 -0800</bug_when>
    <thetext>Hmm, interesting. I definitely ran testb3 before landing maybe I messed up while rebasing or something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258631</commentid>
    <comment_count>6</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2016-12-10 00:54:36 -0800</bug_when>
    <thetext>OK, I&apos;ve found the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258635</commentid>
    <comment_count>7</comment_count>
      <attachid>296789</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2016-12-10 01:02:22 -0800</bug_when>
    <thetext>Created attachment 296789
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258648</commentid>
    <comment_count>8</comment_count>
      <attachid>296789</attachid>
    <who name="Saam Barati">saam</who>
    <bug_when>2016-12-10 01:22:57 -0800</bug_when>
    <thetext>Comment on attachment 296789
Patch

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

&gt; Source/JavaScriptCore/ChangeLog:9
&gt; +        Accidentally we always use edx/rdx for the result of UDiv/UMod.
&gt; +        But it is incorrect. We should use eax/rax for the result of UDiv.

Is there documentation on this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258650</commentid>
    <comment_count>9</comment_count>
      <attachid>296789</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2016-12-10 01:28:16 -0800</bug_when>
    <thetext>Comment on attachment 296789
Patch

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

&gt;&gt; Source/JavaScriptCore/ChangeLog:9
&gt;&gt; +        But it is incorrect. We should use eax/rax for the result of UDiv.
&gt; 
&gt; Is there documentation on this?

It&apos;s x86&apos;s div convension. It should be handled in B3/Air, so that the caller side should not consider about it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1258651</commentid>
    <comment_count>10</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2016-12-10 01:29:42 -0800</bug_when>
    <thetext>Committed r209658: &lt;http://trac.webkit.org/changeset/209658&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>296789</attachid>
            <date>2016-12-10 01:02:22 -0800</date>
            <delta_ts>2016-12-10 01:22:57 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-165651-20161210180139.patch</filename>
            <type>text/plain</type>
            <size>1564</size>
            <attacher name="Yusuke Suzuki">ysuzuki</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjA5NjI0CmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCBj
NDA2ODg5NGQwYWRiMTNiODgwZGM5ODk5ODQ1NWViZWEzNGZhMjMzLi43NjdhNWI1ZWQ5MWFiNjdl
MDhmNDNjOGE4NTIxMjMyZGUxMWUwMGM1IDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNiBAQAorMjAxNi0xMi0xMCAgWXVzdWtlIFN1enVraSAgPHV0YXRhbmUudGVhQGdtYWls
LmNvbT4KKworICAgICAgICBSRUdSRVNTSU9OKHIyMDg3OTEpOiBBc3NlcnRpb24gaW4gdGVzdGIz
CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNjU2NTEK
KworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBBY2NpZGVu
dGFsbHkgd2UgYWx3YXlzIHVzZSBlZHgvcmR4IGZvciB0aGUgcmVzdWx0IG9mIFVEaXYvVU1vZC4K
KyAgICAgICAgQnV0IGl0IGlzIGluY29ycmVjdC4gV2Ugc2hvdWxkIHVzZSBlYXgvcmF4IGZvciB0
aGUgcmVzdWx0IG9mIFVE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VRGl2ID8gWDg2UmVnaXN0ZXJzOjplYXggOiBYODZSZWdpc3RlcnM6OmVkeDsKIAogICAg
ICAgICBhcHBlbmQoTW92ZSwgdG1wKG1fdmFsdWUtPmNoaWxkKDApKSwgZWF4KTsKICAgICAgICAg
YXBwZW5kKFhvcjY0LCBlZHgsIGVkeCk7Cg==
</data>
<flag name="review"
          id="319187"
          type_id="1"
          status="+"
          setter="saam"
    />
          </attachment>
      

    </bug>

</bugzilla>