summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-06-22 13:34:09 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-06-22 12:57:08 +0000
commit03c2661b1243cc529fc3d8cfa65073f1da420307 (patch)
tree678235fdfa6bd162e20c49c36b9ac07e9a177d0c
parent85bb44539aed47856b24ac131f10eb550a080f97 (diff)
Fix alignment issue on ARMv7
As analyzed in the bug report, it appears that we may get QV4::CompiledData::Function pointers for writing that are not aligned for the 64-bit fields at the beginning. [ChangeLog][QtQml] Fix crash due to misaligned data structures on ARMv7 Task-number: QTBUG-61552 Change-Id: I6b2c166b725496150c8850475577628ccd811d65 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
-rw-r--r--src/qml/compiler/qv4compiler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp
index e32749bbf7..c32e1685a0 100644
--- a/src/qml/compiler/qv4compiler.cpp
+++ b/src/qml/compiler/qv4compiler.cpp
@@ -406,6 +406,8 @@ QV4::CompiledData::Unit QV4::Compiler::JSUnitGenerator::generateHeader(QV4::Comp
*jsClassDataOffset = nextOffset;
nextOffset += jsClassData.size();
+ nextOffset = (nextOffset + 7) & ~quint32(0x7);
+
for (int i = 0; i < irModule->functions.size(); ++i) {
QV4::IR::Function *f = irModule->functions.at(i);
functionOffsets[i] = nextOffset;