aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@digia.com>2014-02-06 10:42:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-06 16:02:02 +0100
commit4e835a592901364599da364cfe2006f99e34a6c9 (patch)
treef3a79c73a263cbddb045804f74b20a06ba532be5 /src
parent3c2b337c7e0b5587b25f95622fd3fd49fa29c9a9 (diff)
Fix alignment exception in newCallContext on ARM
CallContext::locals was not at multiple of 8, which caused an alignment exception on ARM. Size for the context is also increased. Change-Id: I136418f89945cd3fec74463659107c6dab7cad0a Reviewed-by: aavit <eirik.aavitsland@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4context.cpp2
-rw-r--r--src/qml/jsruntime/qv4context_p.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index c2c9aefd5f..8c6d75d1de 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -91,7 +91,7 @@ CallContext *ExecutionContext::newCallContext(FunctionObject *function, CallData
c->lookups = c->compilationUnit->runtimeLookups;
}
- c->locals = (SafeValue *)(c + 1);
+ c->locals = (SafeValue *)((quintptr(c + 1) + 7) & ~7);
if (function->varCount)
std::fill(c->locals, c->locals + function->varCount, Primitive::undefinedValue());
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index 334d033193..9f905df15c 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -241,7 +241,7 @@ struct ExecutionContextSaver
/* Function *f, int argc */
#define requiredMemoryForExecutionContect(f, argc) \
- sizeof(CallContext) + sizeof(Value) * (f->varCount + qMax((uint)argc, f->formalParameterCount)) + sizeof(CallData)
+ ((sizeof(CallContext) + 7) & ~7) + sizeof(Value) * (f->varCount + qMax((uint)argc, f->formalParameterCount)) + sizeof(CallData)
} // namespace QV4