Commit d5f07e76 authored by Philip Pfaffe's avatar Philip Pfaffe Committed by Commit Bot

Fix two bugs in wasm debug evaluate.

Change-Id: If7691bc70aac4a8f2ba8fe383bd44a829a9a0bdb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2132265Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67062}
parent c02258f0
......@@ -92,9 +92,9 @@ class DebugEvaluatorProxy {
void GetMemory(uint32_t offset, uint32_t size, uint32_t result) {
wasm::ScheduledErrorThrower thrower(isolate_, "debug evaluate proxy");
// Check all overflows.
if (CheckRangeOutOfBounds(result, size, debuggee_->memory_size(),
if (CheckRangeOutOfBounds(offset, size, debuggee_->memory_size(),
&thrower) ||
CheckRangeOutOfBounds(offset, size, evaluator_->memory_size(),
CheckRangeOutOfBounds(result, size, evaluator_->memory_size(),
&thrower)) {
return;
}
......
......@@ -129,7 +129,7 @@ class WasmEvaluatorBuilder {
void CallGetMemory(std::initializer_list<byte> args) {
push_back(args);
push_back({WASM_CALL_FUNCTION0(wasm_format_function->func_index())});
push_back({WASM_CALL_FUNCTION0(get_memory_function_index)});
}
ZoneBuffer bytes() {
......
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