summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-1320641.js
blob: 6c52c9d178606da5fb3a250eb2b0477860a0c28d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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

function foo(){
  const xs = new Uint16Array(3775336418);
  return xs[-981886074];
}
%PrepareFunctionForOptimization(foo);
foo();

assertEquals(undefined, foo());
%OptimizeFunctionOnNextCall(foo);
assertEquals(undefined, foo());