aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4enginebase_p.h
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-01-05 16:58:54 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2021-01-06 08:48:00 +0100
commitd53fdc516b62cf9e5977f0ab597432033ef790ae (patch)
tree2937e82afe8744f1d92173fd0baf0c7400478566 /src/qml/jsruntime/qv4enginebase_p.h
parent4844d9788ee296c97ac6d2edb651a4107470e67b (diff)
Fix EngineBase::globalObject being misaligned
Fixes: QTBUG-85602 Change-Id: I7cdd83c16bec76c8f902c9136fa89decfc1cbd3d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4enginebase_p.h')
-rw-r--r--src/qml/jsruntime/qv4enginebase_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4enginebase_p.h b/src/qml/jsruntime/qv4enginebase_p.h
index 5e62c5bd50..612c2dd453 100644
--- a/src/qml/jsruntime/qv4enginebase_p.h
+++ b/src/qml/jsruntime/qv4enginebase_p.h
@@ -88,11 +88,12 @@ struct Q_QML_EXPORT EngineBase {
MemoryManager *memoryManager = nullptr;
qint32 callDepth = 0;
+ quint8 padding2[QT_POINTER_SIZE - sizeof(quint32)];
+ Object *globalObject = nullptr;
Value *jsStackLimit = nullptr;
Value *jsStackBase = nullptr;
IdentifierTable *identifierTable = nullptr;
- Object *globalObject = nullptr;
// Exception handling
Value *exceptionValue = nullptr;
@@ -146,6 +147,7 @@ Q_STATIC_ASSERT(offsetof(EngineBase, jsStackTop) == offsetof(EngineBase, current
Q_STATIC_ASSERT(offsetof(EngineBase, hasException) == offsetof(EngineBase, jsStackTop) + QT_POINTER_SIZE);
Q_STATIC_ASSERT(offsetof(EngineBase, memoryManager) == offsetof(EngineBase, hasException) + 8);
Q_STATIC_ASSERT(offsetof(EngineBase, isInterrupted) + sizeof(EngineBase::isInterrupted) <= offsetof(EngineBase, hasException) + 4);
+Q_STATIC_ASSERT(offsetof(EngineBase, globalObject) % QT_POINTER_SIZE == 0);
}