Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.1
-
None
-
compiler: gcc-4.3.2 for MIPS
Description
SIGBUS occured when QML application compiled by gcc for MIPS executed.
Detail:
src/declarative/qml/qdeclarativevmemetaobject.cpp
private: int type; void *data[4]; // Large enough to hold all types inline void cleanup(); };
QDeclarativeVMEVariant::data member is 4 byte alignment by gcc for MIPS,
but this member is required 8 byte alignment.
for example
void QDeclarativeVMEVariant::setValue(double v) { if (type != QMetaType::Double) { cleanup(); type = QMetaType::Double; } *(double *)(dataPtr()) = v; }
To resolve this problem , coding for gcc
private: int type; void *data[4] __attribute__((aligned(8))); // Large enough to hold all types inline void cleanup(); };
I have no idea for other compilers.