From owner-freebsd-arm@FreeBSD.ORG Fri Jan 25 11:39:18 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1173E16A417 for ; Fri, 25 Jan 2008 11:39:18 +0000 (UTC) (envelope-from nick@flirble.org) Received: from plum.flirble.org (plum.flirble.org [194.70.3.20]) by mx1.freebsd.org (Postfix) with ESMTP id D58F313C448 for ; Fri, 25 Jan 2008 11:39:17 +0000 (UTC) (envelope-from nick@flirble.org) Received: from nick by plum.flirble.org with local (Exim 4.66 (FreeBSD)) (envelope-from ) id 1JIMtw-000Pfb-EB; Fri, 25 Jan 2008 11:39:16 +0000 Date: Fri, 25 Jan 2008 11:39:16 +0000 From: Nicholas Clark To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20080125113916.GP81396@plum.flirble.org> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Willem Jan Withagen , freebsd-arm@freebsd.org References: <479880A7.1030107@digiware.nl> <20080124.084828.1608359032.imp@bsdimp.com> <864pd386mj.fsf@ds4.des.no> <20080124.110954.179240992.imp@bsdimp.com> <47991E08.6070609@digiware.nl> <20080125041540.GA30262@zibbi.meraka.csir.co.za> <4799A2B3.4060003@digiware.nl> <86prvq5eua.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86prvq5eua.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.1i X-Organisation: Tetrachloromethane Sender: Nicholas Clark Cc: freebsd-arm@freebsd.org Subject: Re: sshd broken on arm? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2008 11:39:18 -0000 On Fri, Jan 25, 2008 at 12:23:09PM +0100, Dag-Erling Smrgrav wrote: > None of this matters. What John pointed out means that the code is > wrong and the compiler is right. The code is not allowed to assume that > an object is correctly aligned unless it is of a type that requires the > correct alignment. The easiest way to do this is with a union, e.g. Whilst that is correct, why is the compiler changing the alignment of the struct for different optimiser settings but all other flags identical? [Have I got that right?] Surely that's a compiler bug too? (In that it is in breach of an ABI, even if ANSI permits different padding for any different compiler flags, making no special reference to "optimisation") Nicholas Clark