Commit e936685b authored by gdeepti's avatar gdeepti Committed by Commit bot

[wasm] Remove incorrect assembler check.

BUG=chromium:644670
R=ahaas@chromium.org, titzer@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2438593003
Cr-Commit-Position: refs/heads/master@{#40451}
parent 859eddbd
......@@ -351,7 +351,6 @@ void RelocInfo::update_wasm_memory_reference(
icache_flush_mode);
} else if (IsWasmMemorySizeReference(rmode_)) {
uint32_t current_size_reference = wasm_memory_size_reference();
DCHECK(old_size == 0 || current_size_reference <= old_size);
uint32_t updated_size_reference =
new_size + (current_size_reference - old_size);
unchecked_update_wasm_memory_size(updated_size_reference,
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --expose-gc --stress-compaction
// Flags: --expose-wasm --stress-compaction
load("test/mjsunit/wasm/wasm-constants.js");
load("test/mjsunit/wasm/wasm-module-builder.js");
......@@ -441,3 +441,20 @@ function testGrowMemoryOutOfBoundsOffset() {
}
testGrowMemoryOutOfBoundsOffset();
function testGrowMemoryOutOfBoundsOffset2() {
var builder = new WasmModuleBuilder();
builder.addMemory(16, 128, false);
builder.addFunction("main", kSig_v_v)
.addBody([
kExprI32Const, 20,
kExprI32Const, 29,
kExprGrowMemory,
kExprI32StoreMem, 0, 0xFF, 0xFF, 0xFF, 0x3a
])
.exportAs("main");
var module = builder.instantiate();
assertTraps(kTrapMemOutOfBounds, module.exports.main);
}
testGrowMemoryOutOfBoundsOffset2();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment