diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-09-11 11:26:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-12 19:05:44 +0200 |
commit | bf22c55036f6429ccfc849ea71f33e757fae47fa (patch) | |
tree | 7f0baad7694255ceeb9c5f50139f51875f771113 /src/qml/compiler/qv4isel_p.cpp | |
parent | b8d0d3cbdd69291bd750912a6d8d6703a7feeb6a (diff) |
Fix passing of exception table pointers to ARM runtime on unwinding
Our synthetic exception unwind table for ARM is located at
(char *)codeStart + function->codeSize;
This relies on function->codeSize to contain the number of bytes of
instructions the function has, not the size of the MacroAssemblerCodeRef
(which contains the size of the entire area).
This patch fixes the calculation of function->codeSize and also replaces
the QHash for the IR::Function* -> CodeRef mapping in the masm backend
with a simple vector that's perfectly sufficient.
Bug spotted by Petr Nejedly
Change-Id: I78a53599085c613c6d97aa2490922f54e0bb4f63
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_p.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_p.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp index 66f8ca5327..df879f5796 100644 --- a/src/qml/compiler/qv4isel_p.cpp +++ b/src/qml/compiler/qv4isel_p.cpp @@ -78,8 +78,8 @@ QV4::CompiledData::CompilationUnit *EvalInstructionSelection::compile() Function *rootFunction = irModule->rootFunction; if (!rootFunction) return 0; - foreach (V4IR::Function *f, irModule->functions) - run(f); + for (int i = 0; i < irModule->functions.size(); ++i) + run(i); return backendCompileStep(); } |