diff options
| author | Dmitry Shachnev <[email protected]> | 2017-06-16 22:51:57 +0300 |
|---|---|---|
| committer | Dmitry Shachnev <[email protected]> | 2017-06-18 12:41:13 +0000 |
| commit | 4199572d64d46bfa2efdcf7c910e81e5b8fb5547 (patch) | |
| tree | 10e701559f20b2a29080329a3c0a99936acf74c2 /src/qml/compiler/qv4compileddata.cpp | |
| parent | 939f07695b853a4da2e237c5f1c3d50e34f9c45c (diff) | |
Fix QML compiler crashes on big endian systems
Commit be491913c036b148 changed QV4::CompiledData::Unit to use LEUInt32
structures internally, rather than native uints, however the generators
were not updated at that time and still wrote native uints.
Also initialize constants field of CompilationUnit to prevent crashes
in unlink() where operator delete[] is called.
Change-Id: Id6c6e6ad519c9927ba6027479689ecfde9ea86de
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
| -rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 485a5e6fb7..db707061fe 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -99,6 +99,7 @@ CompilationUnit::CompilationUnit() , runtimeLookups(0) , runtimeRegularExpressions(0) , runtimeClasses(0) + , constants(nullptr) , totalBindingsCount(0) , totalParserStatusCount(0) , totalObjectCount(0) @@ -239,6 +240,7 @@ void CompilationUnit::unlink() runtimeFunctions.clear(); #if Q_BYTE_ORDER == Q_BIG_ENDIAN delete [] constants; + constants = nullptr; #endif } |
