From 80066259f1fcda5d057899592cdecdaff068e9a3 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 28 Oct 2011 12:06:17 +0200 Subject: [PATCH] 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 --- src/declarative/qml/qdeclarativevmemetaobject_p.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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; -- 1.7.2.5