Align SnapshotData to word boundary.
Point fix for a misaligned memory access crash in pacprocessor.
Ideally we might want to pull in a more recent v8 snapshot here,
but external/v8 is currently only used by external/chromium-libpac
to parse Javascript-based PAC files and the latter no longer has
a owner. So let's just fix this particular crash for now and keep
the rest untouched.
Bug: 26150045
FPIIM-449
Change-Id: I28e4c8fede9b97009049857aa253da78f68a6368
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc
index 988e7da..e5abfb2 100644
--- a/src/mksnapshot.cc
+++ b/src/mksnapshot.cc
@@ -81,7 +81,7 @@
}
void WriteData(const i::Vector<const i::byte>& blob) const {
- fprintf(fp_, "static const byte blob_data[] = {\n");
+ fprintf(fp_, "static const byte blob_data[] __attribute__((aligned(8))) = {\n");
WriteSnapshotData(blob);
fprintf(fp_, "};\n");
fprintf(fp_, "static const int blob_size = %d;\n", blob.length());