-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[maglev][arm] Fix CheckJSTypedArrayBounds index check
... by checking for overflow when shifting the index (actually the carry bit since mov does not affect the overflow flag). Fixed: chromium:1459841 Bug: v8:7700 Change-Id: Ide774107d91a0c9e2b1122ebfd00dde56dd0d3c7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4677660 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#88824}
- Loading branch information
1 parent
5781df7
commit a9955bd
Showing
2 changed files
with
23 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
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,16 @@ | ||
// Copyright 2023 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
// | ||
// Flags: --allow-natives-syntax --maglev | ||
let a = new Float32Array(1000); | ||
function foo(i) { | ||
return a[i]; | ||
} | ||
|
||
%PrepareFunctionForOptimization(foo); | ||
assertEquals(0, foo(0)); | ||
assertEquals(0, foo(0)); | ||
|
||
%OptimizeMaglevOnNextCall(foo); | ||
assertEquals(undefined, foo(0x40000000)); // On 32 bits, this will overflow the array index. |