[Webkit-unassigned] [Bug 275980] New: Negative length exception for TypedArray constructor is not thrown in JIT compiler
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 27 19:53:44 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=275980
Bug ID: 275980
Summary: Negative length exception for TypedArray constructor
is not thrown in JIT compiler
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: q602706150 at gmail.com
The following script should print `pass`.
```
function opt(a) {
new Uint8Array(a);
}
for(let i=0;i<1000000;i++){
opt(50)
}
try{
opt(-50)
print("not pass")
}catch(e){
print(e)
print("pass")
}
```
Actual output:
```
not pass
```
Expected output:
```
RangeError: length cannot be negative
pass
```
run args:
cmake-build-debug/bin/jsc --useConcurrentJIT=0 ./test.js
tested on jsc commit id:
47fe298829ac629f561518641b7e6bc4069cb09b
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240628/12c381af/attachment.htm>
More information about the webkit-unassigned
mailing list