From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [Patch] cld: pad protocol structures Date: Wed, 26 Aug 2009 02:25:29 -0400 Message-ID: <4A94D559.8060004@garzik.org> References: <20090825183740.24cbc72d@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090825183740.24cbc72d@redhat.com> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Pete Zaitcev Cc: Project Hail List On 08/25/2009 08:37 PM, Pete Zaitcev wrote: > As it turned out, sizeof produces different results on 64-bit and > 32-bit hosts because the size of the structure may aligned on whatever > biggest alignment the gcc decides appropriate. It's not necesserily > the biggest type, as on RISCs and Itanium, where accessing arrays > of structs with misaligned sizeof will cause SIGBUS. As a result, > our structs varied in size despite using fixed-size types. > > Our preferred fix is to pad structures so that they become more > portable. > > This patch creates a flag day on 32-bit systems (but not on 64-bit > ones). CLD clients and the daemon must be rebuilt. > > Signed-Off-By: Pete Zaitcev applied