-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 259548.763@safari-7615-branch (62d974e). https://bugs.web…
…kit.org/show_bug.cgi?id=256865 [JSC] GetTypedArrayByteOffset should do speculation check for all bits in DFG https://bugs.webkit.org/show_bug.cgi?id=256865 rdar://109428505 Reviewed by Yusuke Suzuki. DFG abstract interpreter speculates that GetTypedArrayByteOffset node should have int32 result. However, when compiling GetTypedArrayByteOffset we only do speculation check on lower bits of the result, which is wrong. This patch fixes this problem. * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp: Canonical link: https://commits.webkit.org/259548.763@safari-7615-branch
- Loading branch information
1 parent
42bc82e
commit ef65ba5
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function main() { | ||
const buffer = new ArrayBuffer(4294967296); | ||
|
||
const arr = new Uint8ClampedArray(buffer, 50) | ||
const arr2 = new Uint8ClampedArray(buffer, 4294967296) | ||
|
||
function opt(a, marr) { | ||
return marr[a.byteOffset] | ||
} | ||
|
||
const marr = [] | ||
for (let i = 0; i < 1000; i++) { | ||
marr.push(3) | ||
} | ||
|
||
for (let i = 0; i < 14; i++) { | ||
opt(arr, marr) | ||
} | ||
print(opt(arr2, marr)) | ||
} | ||
noDFG(main); | ||
noFTL(main); | ||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters