diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-09-27 05:17:25 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-09-27 05:17:25 (GMT) |
commit | e90cffc2c5f313cc813d0a21a1d9d0afe8d0ea7a (patch) | |
tree | d0ab4ed127240ad7159188f1354247a23ee24699 | |
parent | 872872f3d3f0d89010d3a196b70e8445a08d0784 (diff) | |
download | Qt-e90cffc2c5f313cc813d0a21a1d9d0afe8d0ea7a.zip Qt-e90cffc2c5f313cc813d0a21a1d9d0afe8d0ea7a.tar.gz Qt-e90cffc2c5f313cc813d0a21a1d9d0afe8d0ea7a.tar.bz2 |
Crash in QDeclarativeCompiler::indexOfProperty
In QDeclarativePropertyCache, plain integer bitfield overrideIndex is
initialized with -1 in class constructor. Unfortunately, ARM compiler
treats bitfields as unsigned, unless explicitly defined as signed [1].
Therefore, overrideIndex actually gets initial value of 2147483647,
which causes array operations done with the index to fail.
As a fix, define overrideIndex as signed int bitfield.
[1] http://www.keil.com/support/man/docs/armccref/armccref_Babjddhe.htm
Under bitfields/Note: "A plain bitfield, declared without either
signed or unsigned qualifiers, is treated as unsigned"
Task-number: QT-5285
Reviewed-by: Aaron Kennedy
-rw-r--r-- | src/declarative/qml/qdeclarativepropertycache_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h index 581f519..c648d25 100644 --- a/src/declarative/qml/qdeclarativepropertycache_p.h +++ b/src/declarative/qml/qdeclarativepropertycache_p.h @@ -111,7 +111,7 @@ public: int relatedIndex; // When IsFunction }; uint overrideIndexIsProperty : 1; - int overrideIndex : 31; + signed int overrideIndex : 31; int revision; int metaObjectOffset; |