forked from capablevms/v8
-
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.
[turboshaft] Prevent Load offsets underflow when kind has tagged_base
Bug: v8:12783 Change-Id: I996714051c9a5738278016d531625558b79e4cd1 Fixed: chromium:1520362 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5233718 Reviewed-by: Jakob Kummerow <[email protected]> Commit-Queue: Darius Mercadier <[email protected]> Auto-Submit: Darius Mercadier <[email protected]> Cr-Commit-Position: refs/heads/main@{#92012}
- Loading branch information
1 parent
b3ac387
commit 7c0f4cc
Showing
3 changed files
with
45 additions
and
10 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
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,20 @@ | ||
// Copyright 2024 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. | ||
|
||
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js'); | ||
|
||
const builder = new WasmModuleBuilder(); | ||
let array = builder.addArray(kWasmI32, true); | ||
|
||
builder.addFunction("main", kSig_v_v).exportFunc().addBody([ | ||
kExprRefNull, array, | ||
...wasmI32Const(0xbffffffa), | ||
kExprI32Const, 1, | ||
kExprI32ShrS, | ||
kExprI32Const, 42, | ||
kGCPrefix, kExprArraySet, array, | ||
]); | ||
|
||
const instance = builder.instantiate(); | ||
assertThrows(() => instance.exports.main(), WebAssembly.RuntimeError); |