From owner-freebsd-current@FreeBSD.ORG Mon Jul 5 16:11:01 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4279E16A4CE for ; Mon, 5 Jul 2004 16:11:01 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 74A5843D39 for ; Mon, 5 Jul 2004 16:11:00 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 5 Jul 2004 17:10:59 +0100 (BST) Date: Mon, 5 Jul 2004 17:10:59 +0100 From: David Malone To: des@des.no Message-ID: <20040705161059.GA52584@walton.maths.tcd.ie> References: <20040705133820.GA9159@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i Sender: dwmalone@maths.tcd.ie cc: Divacky Roman cc: current@freebsd.org Subject: Re: recent libalias changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 16:11:01 -0000 On Mon, Jul 05, 2004 at 05:30:49PM +0200, des@des.no wrote: > Divacky Roman writes: > > I can sadly report that recent changes to libalias made by des doesnt > > help me use natd with -Os built libalias.. it still doesnt work ;( > > Could you please try to figure out exactly which optimization option > breaks libalias? It is most likely one of these: With Divacky's help we localised his problem to alias.c. The twowords function breaks the strick aliasing rule, try replacing it with: static __inline int twowords(void *p) { unsigned char *c = p; return ((((unsigned short)c[1] + (unsigned short)c[3])<<8) + c[0] + c[2]; } David.