Commit 578c3a3b authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

[wasm] Use kSystemPointerSize to check for alignment

Change-Id: I84d53282278d12c2e47b8e9a07b69ecf89dba237
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087692
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66584}
parent e4b5dfed
......@@ -362,7 +362,9 @@ void NativeModuleSerializer::WriteCode(const WasmCode* code, Writer* writer) {
// buffer if necessary so we can relocate the serialized code.
std::unique_ptr<byte[]> aligned_buffer;
if (!IsAligned(reinterpret_cast<Address>(serialized_code_start),
kInt32Size)) {
kSystemPointerSize)) {
// 'byte' does not guarantee an alignment but seems to work well enough in
// practice.
aligned_buffer.reset(new byte[code_size]);
code_start = aligned_buffer.get();
}
......
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