<?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>192908</bug_id>
          
          <creation_ts>2018-12-19 18:15:33 -0800</creation_ts>
          <short_desc>StrengthReductionPhase ValueAdd rule handles BigInt handleCommutativity is breaking JSC::DFG::Edge::useKind()</short_desc>
          <delta_ts>2018-12-20 02:28:44 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>192723</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Caio Lima">ticaiolima</reporter>
          <assigned_to name="Caio Lima">ticaiolima</assigned_to>
          <cc>ews-watchlist</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>msaboff</cc>
    
    <cc>saam</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1489652</commentid>
    <comment_count>0</comment_count>
    <who name="Caio Lima">ticaiolima</who>
    <bug_when>2018-12-19 18:15:33 -0800</bug_when>
    <thetext>Now, there are 35 tests failing into Debug builds:

https://build.webkit.org/builders/Apple%20High%20Sierra%20Debug%20JSC%20%28Tests%29/builds/1926/steps/jscore-test/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489653</commentid>
    <comment_count>1</comment_count>
      <attachid>357768</attachid>
    <who name="Caio Lima">ticaiolima</who>
    <bug_when>2018-12-19 18:19:36 -0800</bug_when>
    <thetext>Created attachment 357768
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489700</commentid>
    <comment_count>2</comment_count>
      <attachid>357768</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2018-12-19 20:26:13 -0800</bug_when>
    <thetext>Comment on attachment 357768
Patch

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

&gt; Source/JavaScriptCore/ChangeLog:10
&gt; +        Current rule is considering that both operands of ValueAdd have nodes,
&gt; +        but this is not quite true. In such case, we are checking the
&gt; +        existence of both nodes before using m_node-&gt;binaryUseKind.

I don&apos;t understand: when would ValueAdd ever not have children nodes?  Also, please provide a test case.  The test will help illustrate the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489701</commentid>
    <comment_count>3</comment_count>
      <attachid>357768</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2018-12-19 20:27:36 -0800</bug_when>
    <thetext>Comment on attachment 357768
Patch

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

&gt;&gt; Source/JavaScriptCore/ChangeLog:10
&gt;&gt; +        existence of both nodes before using m_node-&gt;binaryUseKind.
&gt; 
&gt; I don&apos;t understand: when would ValueAdd ever not have children nodes?  Also, please provide a test case.  The test will help illustrate the issue.

Oh, I see there are already failing tests.  I&apos;m still surprised that ValueAdd has edges that don&apos;t have nodes.  Perhaps there&apos;s something I don&apos;t know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489767</commentid>
    <comment_count>4</comment_count>
      <attachid>357768</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-12-19 23:24:49 -0800</bug_when>
    <thetext>Comment on attachment 357768
Patch

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

&gt;&gt;&gt; Source/JavaScriptCore/ChangeLog:10
&gt;&gt;&gt; +        existence of both nodes before using m_node-&gt;binaryUseKind.
&gt;&gt; 
&gt;&gt; I don&apos;t understand: when would ValueAdd ever not have children nodes?  Also, please provide a test case.  The test will help illustrate the issue.
&gt; 
&gt; Oh, I see there are already failing tests.  I&apos;m still surprised that ValueAdd has edges that don&apos;t have nodes.  Perhaps there&apos;s something I don&apos;t know.

Yeah, I don&apos;t think the current situation is right. ValueAdd must have two children.
If it happens, it&apos;s a bug. We should fix that bug instead of checking `child1().node() &amp;&amp; child2().node()`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489808</commentid>
    <comment_count>5</comment_count>
    <who name="Caio Lima">ticaiolima</who>
    <bug_when>2018-12-20 02:28:14 -0800</bug_when>
    <thetext>Thx for the review.

(In reply to Yusuke Suzuki from comment #4)
&gt; Comment on attachment 357768 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=357768&amp;action=review
&gt; 
&gt; &gt;&gt;&gt; Source/JavaScriptCore/ChangeLog:10
&gt; &gt;&gt;&gt; +        existence of both nodes before using m_node-&gt;binaryUseKind.
&gt; &gt;&gt; 
&gt; &gt;&gt; I don&apos;t understand: when would ValueAdd ever not have children nodes?  Also, please provide a test case.  The test will help illustrate the issue.
&gt; &gt; 
&gt; &gt; Oh, I see there are already failing tests.  I&apos;m still surprised that ValueAdd has edges that don&apos;t have nodes.  Perhaps there&apos;s something I don&apos;t know.
&gt; 
&gt; Yeah, I don&apos;t think the current situation is right. ValueAdd must have two
&gt; children.
&gt; If it happens, it&apos;s a bug. We should fix that bug instead of checking
&gt; `child1().node() &amp;&amp; child2().node()`.

Makes sense. The bug happens when there are 2 constant Strings into ValueAdd and we perform the folding. When this happened we should not execute &quot;m_node-&gt;binaryUseKind()&quot;. I&apos;m closing this to fix into original Bug https://bugs.webkit.org/show_bug.cgi?id=192723 since we rolled this out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489809</commentid>
    <comment_count>6</comment_count>
    <who name="Caio Lima">ticaiolima</who>
    <bug_when>2018-12-20 02:28:44 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 192723 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>357768</attachid>
            <date>2018-12-19 18:19:36 -0800</date>
            <delta_ts>2018-12-19 23:24:49 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-192908-20181220001935.patch</filename>
            <type>text/plain</type>
            <size>1682</size>
            <attacher name="Caio Lima">ticaiolima</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjM5Mzc3CmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCAw
NjFkOTBiZjdlYThlODUyNGYyNmU1ZDI0MTc4ZGI3MTIzZmVkN2JlLi43ZTExYjBmNjBiMmNlZTE5
MzY4ODkwOTY5NmYwOWIxMDAyNDQxZmEwIDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNyBAQAorMjAxOC0xMi0xOSAgQ2FpbyBMaW1hICA8dGljYWlvbGltYUBnbWFpbC5jb20+
CisKKyAgICAgICAgU3RyZW5ndGhSZWR1Y3Rpb25QaGFzZSBWYWx1ZUFkZCBydWxlIGhhbmRsZXMg
QmlnSW50IGhhbmRsZUNvbW11dGF0aXZpdHkgaXMgYnJlYWtpbmcgSlNDOjpERkc6OkVkZ2U6OnVz
ZUtpbmQoKQorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
MTkyOTA4CisKK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XNlLmNw
cAorKysgYi9Tb3VyY2UvSmF2YVNjcmlwdENvcmUvZGZnL0RGR1N0cmVuZ3RoUmVkdWN0aW9uUGhh
c2UuY3BwCkBAIC0zNzQsNyArMzc0LDcgQEAgcHJpdmF0ZToKICAgICAgICAgICAgICAgICBtX2No
YW5nZWQgPSB0cnVlOwogICAgICAgICAgICAgfQogCi0gICAgICAgICAgICBpZiAobV9ub2RlLT5i
aW5hcnlVc2VLaW5kKCkgPT0gQmlnSW50VXNlKQorICAgICAgICAgICAgaWYgKG1fbm9kZS0+Y2hp
bGQxKCkubm9kZSgpICYmIG1fbm9kZS0+Y2hpbGQyKCkubm9kZSgpICYmIG1fbm9kZS0+YmluYXJ5
VXNlS2luZCgpID09IEJpZ0ludFVzZSkKICAgICAgICAgICAgICAgICBoYW5kbGVDb21tdXRhdGl2
aXR5KCk7CiAKICAgICAgICAgICAgIGJyZWFrOwo=
</data>
<flag name="review"
          id="374640"
          type_id="1"
          status="-"
          setter="ysuzuki"
    />
          </attachment>
      

    </bug>

</bugzilla>