Bug 257949 - JSC computes incorrectly in DFG
Summary: JSC computes incorrectly in DFG
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Yijia Huang
URL:
Keywords: InRadar
Depends on: 259065 271788
Blocks:
  Show dependency treegraph
 
Reported: 2023-06-12 00:09 PDT by ChristineWillice
Modified: 2024-04-13 03:56 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ChristineWillice 2023-06-12 00:09:04 PDT
``````````````test.js`````````````````
function opt(v)
{
  return ((-1 >>> v) + -0.2) | 0
}
for (let i = 0; i < 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.
Comment 1 Alexey Proskuryakov 2023-06-12 13:07:16 PDT
Reproduces on Apple Silicon macOS, too.
Comment 2 Radar WebKit Bug Importer 2023-06-12 13:07:27 PDT
<rdar://problem/110661900>
Comment 3 Justin Michaud 2023-06-26 18:54:22 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15311
Comment 4 EWS 2023-07-06 20:50:07 PDT
Committed 265833@main (2f7262436c99): <https://commits.webkit.org/265833@main>

Reviewed commits have been landed. Closing PR #15311 and removing active labels.
Comment 5 WebKit Commit Bot 2023-07-10 12:13:27 PDT
Re-opened since this is blocked by bug 259065
Comment 6 Carlos Alberto Lopez Perez 2023-07-11 06:39:17 PDT
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
Comment 7 Yijia Huang 2024-03-19 10:17:00 PDT
Pull request: https://github.com/WebKit/WebKit/pull/26024
Comment 8 EWS 2024-03-25 07:34:18 PDT
Committed 276654@main (f5b95a221c2e): <https://commits.webkit.org/276654@main>

Reviewed commits have been landed. Closing PR #26024 and removing active labels.
Comment 9 WebKit Commit Bot 2024-03-27 13:04:14 PDT
Re-opened since this is blocked by bug 271788
Comment 10 Yijia Huang 2024-04-05 14:31:12 PDT
Pull request: https://github.com/WebKit/WebKit/pull/26913
Comment 11 EWS 2024-04-13 03:56:46 PDT
Committed 277456@main (6c214dfbb5a1): <https://commits.webkit.org/277456@main>

Reviewed commits have been landed. Closing PR #26913 and removing active labels.