diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-03-14 17:02:59 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-03-17 08:36:03 +0000 |
commit | cbdf28b078bbe0ce4136013ecdba1511fc926601 (patch) | |
tree | 8bfcd8139734a90803cef286105ca94af6336b85 /src/qml/jit/qv4assembler_p.h | |
parent | 53547ee6b3a828969a3e2283a6ea5b3141f065d5 (diff) |
Protect ExecutionContext member usage against word size differences
Ensure the offsets we're taking from ExecutionContext members in the JIT
code generator can be translated from host architecture sizes to target
architecture, using assertions and a memory layout that we already have
in the dev branch with commit 4de7e48ab160dacc7a09360e80264eac4945a8f4.
Task-number: QTBUG-58666
Change-Id: I26cdbd1ddb995b116624fab16f7caba5d21c13b5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jit/qv4assembler_p.h')
-rw-r--r-- | src/qml/jit/qv4assembler_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h index 3cd33e91e7..1a9aefb4bc 100644 --- a/src/qml/jit/qv4assembler_p.h +++ b/src/qml/jit/qv4assembler_p.h @@ -1324,7 +1324,7 @@ public: // load the table from the context loadPtr(Address(EngineRegister, targetStructureOffset(offsetof(QV4::EngineBase, current))), ScratchRegister); - loadPtr(Address(ScratchRegister, qOffsetOf(QV4::Heap::ExecutionContext, lookups)), + loadPtr(Address(ScratchRegister, targetStructureOffset(Heap::ExecutionContext::baseOffset + offsetof(Heap::ExecutionContextData, lookups))), lookupCall.addr.base); // pre-calculate the indirect address for the lookupCall table: if (lookupCall.addr.offset) |