Bug 265272 - Integer calculation error after JIT optimization.
Summary: Integer calculation error after JIT optimization.
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All Linux
: P2 Normal
Assignee: David Degazio
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-22 18:44 PST by anbu1024
Modified: 2023-12-13 14:56 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anbu1024 2023-11-22 18:44:59 PST
JSC version:
5a5dc5a5c26808fa98392aecc83d38935b72d255

Build options:
```
./Tools/Scripts/build-jsc --jsc-only --debug
```

test case:
```
function opt(){
	var x = -19278.05 >>> String;
	var y = x + -19278.05;
	var z = y >> String;
	return z;
}

let a = opt();

print("result before JIT opt")
print(a);

for(let i=0; i<0x200; i++){
	opt();
}

let b = opt();

print("result after JIT opt")
print(b);

```

Result:
```
result before JIT opt
-38557
result after JIT opt
-38556
```
Comment 1 Radar WebKit Bug Importer 2023-11-22 18:45:09 PST
<rdar://problem/118731614>
Comment 2 David Degazio 2023-12-13 14:56:07 PST
Pull request: https://github.com/WebKit/WebKit/pull/21767