Commit 8ba81622 authored by Paolo Severini's avatar Paolo Severini Committed by V8 LUCI CQ

[wasm] Fix WasmInstanceObject::GetGlobalBufferAndIndex

Fixing an issue in WasmInstanceObject::GetGlobalBufferAndIndex.

Bug: v8:13309
Change-Id: I52e65c109e43ce0300513604e71e587e1949f70a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3907666Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarSamuel Groß <saelo@chromium.org>
Commit-Queue: Paolo Severini <paolosev@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#83345}
parent 20db58cb
......@@ -1501,7 +1501,8 @@ WasmInstanceObject::GetGlobalBufferAndIndex(Handle<WasmInstanceObject> instance,
FixedArray::cast(
instance->imported_mutable_globals_buffers().get(global.index)),
isolate);
Address idx = instance->imported_mutable_globals().get(global.index);
Address idx = instance->imported_mutable_globals().get_int(
global.index * kSystemPointerSize);
DCHECK_LE(idx, std::numeric_limits<uint32_t>::max());
return {buffer, static_cast<uint32_t>(idx)};
}
......
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