mirrored from https://chromium.googlesource.com/v8/v8.git
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged: [wasm-simd] Fix bounds check for load extends
Load extends always load 8 bytes, so the access size does not depend on MachineType of the load. The MachineType is used for classifying the lane shape of the 8-byte load. Also add cctest to load splats and load extends to test OOB. (Note that load splats access size depends on MachineType). Add regression test from clusterfuzz, minimized by ahaas@. Remove the `--no-wasm-trap-handler` flag since we have a no_wasm_traps variant that should test this flag. Bug: chromium:1116019 (cherry picked from commit a85b5a6) Change-Id: I6fc3ef9d7ac8a50037224e7886037fd0d2dcf16e No-Try: true No-Presubmit: true No-Tree-Checks: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2367332 Reviewed-by: Andreas Haas <[email protected]> Commit-Queue: Zhi An Ng <[email protected]> Cr-Commit-Position: refs/branch-heads/8.6@{#4} Cr-Branched-From: a64aed2-refs/heads/8.6.395@{#1} Cr-Branched-From: a626bc0-refs/heads/master@{#69472}
- Loading branch information
Showing
4 changed files
with
63 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
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 @@ | ||
// Copyright 2020 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: --experimental-wasm-simd | ||
|
||
load('test/mjsunit/wasm/wasm-module-builder.js'); | ||
|
||
const builder = new WasmModuleBuilder(); | ||
builder.addMemory(16, 32, false); | ||
builder.addType(makeSig([], [kWasmI32])); | ||
// Generate function 1 (out of 1). | ||
builder.addFunction(undefined, 0 /* sig */) | ||
.addBodyWithEnd([ | ||
// signature: i_v | ||
// body: | ||
kExprI32Const, 0x00, // i32.const | ||
kSimdPrefix, kExprI16x8Load8x8U, 0x03, 0xff, 0xff, 0x3f, // i16x8.load8x8_u | ||
kSimdPrefix, kExprI16x8ExtractLaneS, 0, | ||
kExprEnd, // end @371 | ||
]).exportAs('main'); | ||
const instance = builder.instantiate(); | ||
assertTraps(kTrapMemOutOfBounds, () => instance.exports.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