Commit a7abde7c authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] [trap-handler] Report correct code size

Instead of using the size of the whole code object, just use the size
of the instructions, because only there faults can happen.

R=eholk@chromium.org

Bug: v8:5277
Change-Id: Ia5768891ec3c1ee5ad8affc9486e044d79e23146
Reviewed-on: https://chromium-review.googlesource.com/712536Reviewed-by: 's avatarEric Holk <eholk@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48464}
parent 5d3dfc85
......@@ -89,8 +89,7 @@ void UnpackAndRegisterProtectedInstructions(Isolate* isolate,
}
if (unpacked.empty()) continue;
int size = code->CodeSize();
const int index = RegisterHandlerData(reinterpret_cast<void*>(base), size,
const int index = RegisterHandlerData(base, code->instruction_size(),
unpacked.size(), &unpacked[0]);
unpacked.clear();
// TODO(eholk): if index is negative, fail.
......
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