<?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>257949</bug_id>
          
          <creation_ts>2023-06-12 00:09:04 -0700</creation_ts>
          <short_desc>JSC computes incorrectly in DFG</short_desc>
          <delta_ts>2025-05-23 17:27:20 -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>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>
          <dependson>259065</dependson>
    
    <dependson>271788</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="ChristineWillice">ChristineWillice</reporter>
          <assigned_to name="Yijia Huang">yijia_huang</assigned_to>
          <cc>anbu1024</cc>
    
    <cc>clopez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1960987</commentid>
    <comment_count>0</comment_count>
    <who name="ChristineWillice">ChristineWillice</who>
    <bug_when>2023-06-12 00:09:04 -0700</bug_when>
    <thetext>``````````````test.js`````````````````
function opt(v)
{
  return ((-1 &gt;&gt;&gt; v) + -0.2) | 0
}
for (let i = 0; i &lt; 100; i++) {
  opt(0)
}
print(opt(32))
``````````````````````````````````````

This bug is in latest version JSC.

Run args: ./jsc test.js --useConcurrentJIT=0 --jitPolicyScale=0

The corrent result is -2, but JSC prints -1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961121</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-06-12 13:07:16 -0700</bug_when>
    <thetext>Reproduces on Apple Silicon macOS, too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961122</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-06-12 13:07:27 -0700</bug_when>
    <thetext>&lt;rdar://problem/110661900&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963710</commentid>
    <comment_count>3</comment_count>
    <who name="Justin Michaud">justin_michaud</who>
    <bug_when>2023-06-26 18:54:22 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/15311</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965487</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-07-06 20:50:07 -0700</bug_when>
    <thetext>Committed 265833@main (2f7262436c99): &lt;https://commits.webkit.org/265833@main&gt;

Reviewed commits have been landed. Closing PR #15311 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965992</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2023-07-10 12:13:27 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 259065</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1966180</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2023-07-11 06:39:17 -0700</bug_when>
    <thetext>BTW, this also caused crashes on the kraken benchmark (on GTK/WPE 64-bits builds). For example when running it with the run-benchmark tool like: Tools/Scripts/run-benchmark --plan kraken [...]
Crash log: http://sprunge.us/ZhSWj6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2022180</commentid>
    <comment_count>7</comment_count>
    <who name="Yijia Huang">yijia_huang</who>
    <bug_when>2024-03-19 10:17:00 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/26024</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2023781</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-03-25 07:34:18 -0700</bug_when>
    <thetext>Committed 276654@main (f5b95a221c2e): &lt;https://commits.webkit.org/276654@main&gt;

Reviewed commits have been landed. Closing PR #26024 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2024264</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2024-03-27 13:04:14 -0700</bug_when>
    <thetext>Re-opened since this is blocked by bug 271788</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2026376</commentid>
    <comment_count>10</comment_count>
    <who name="Yijia Huang">yijia_huang</who>
    <bug_when>2024-04-05 14:31:12 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/26913</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2028278</commentid>
    <comment_count>11</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-04-13 03:56:46 -0700</bug_when>
    <thetext>Committed 277456@main (6c214dfbb5a1): &lt;https://commits.webkit.org/277456@main&gt;

Reviewed commits have been landed. Closing PR #26913 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2119461</commentid>
    <comment_count>12</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2025-05-23 17:27:20 -0700</bug_when>
    <thetext>*** Bug 265272 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>