Commit 5dca2bd7 authored by Ivo Markovic's avatar Ivo Markovic Committed by Commit Bot

Force proper code aligment in wasm serializer.

Change-Id: Iace7040f7327cbc76e75a0cd7229221c93a9456e
Reviewed-on: https://chromium-review.googlesource.com/975547Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52174}
parent 32ea5662
......@@ -100,7 +100,7 @@ class V8_EXPORT_PRIVATE WasmCode final {
// kOther is used if we have WasmCode that is neither
// liftoff- nor turbofan-compiled, i.e. if Kind is
// not a kFunction.
enum Tier : int8_t { kLiftoff, kTurbofan, kOther };
enum Tier : int32_t { kLiftoff, kTurbofan, kOther };
Vector<byte> instructions() const { return instructions_; }
Vector<const byte> reloc_info() const {
......
......@@ -377,6 +377,7 @@ void NativeModuleSerializer::BufferCodeInAllocatedScratch(
writer.Write(code->tier());
// next is the code, which we have to reloc.
Address serialized_code_start = writer.current_buffer().start();
DCHECK(IsAddressAligned(serialized_code_start, 4));
// write the code and everything else
writer.WriteVector(code->instructions());
writer.WriteVector(code->reloc_info());
......
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