From: Simon Hausmann Date: Fri, 28 Oct 2011 10:06:17 +0000 (+0200) Subject: Fix bus errors on Linux/ARM due to word alignment issues X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=80066259f1fcda5d057899592cdecdaff068e9a3;p=konrad%2Fqtdeclarative.git Fix bus errors on Linux/ARM due to word alignment issues If the kernel is configured to SIGBUS on unaligned word access, then the code in qdeclarativecompiler.cpp that accesses the structs that follow QDeclarativeVMEMetaData in memory may cause the process to get killed. They contain integers but they're not aligned. Ensure that the size of the first structure gives integer alignment for the following structures. Change-Id: Iad85557aa3be4949f653d389dbaa3666960be404 Reviewed-by: Thiago Macieira --- diff --git a/src/declarative/qml/qdeclarativevmemetaobject_p.h b/src/declarative/qml/qdeclarativevmemetaobject_p.h index 400961b..6076dcf 100644 --- a/src/declarative/qml/qdeclarativevmemetaobject_p.h +++ b/src/declarative/qml/qdeclarativevmemetaobject_p.h @@ -84,6 +84,8 @@ struct QDeclarativeVMEMetaData short aliasCount; short signalCount; short methodCount; + short dummyForAlignment; // Add padding to ensure that the following + // AliasData/PropertyData/MethodData is int aligned. struct AliasData { int contextIdx;