From owner-freebsd-current@FreeBSD.ORG Tue Jul 6 11:14:06 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 C436416A4CE for ; Tue, 6 Jul 2004 11:14:06 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id D067143D4C for ; Tue, 6 Jul 2004 11:14:05 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 6 Jul 2004 12:14:04 +0100 (BST) Date: Tue, 6 Jul 2004 12:14:03 +0100 From: David Malone To: des@des.no Message-ID: <20040706111403.GA68327@walton.maths.tcd.ie> References: <20040705133820.GA9159@stud.fit.vutbr.cz> <20040705161059.GA52584@walton.maths.tcd.ie> <20040706082906.GA50212@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: Tue, 06 Jul 2004 11:14:06 -0000 On Tue, Jul 06, 2004 at 12:12:50PM +0200, des@des.no wrote: > Done. Could you please also test this one? It fixes an aliasing > violation in another checksum function in libalias (at least > partially, I may have to rewrite the entire function). The bit of the function that the patch changes seems to only be accessing the data through char types, which the C standard says can alias any type. The while loop that is immediately above it looks risky though, as this function is probably called with a struct ip * somewhere. I guess this may not cause problems in practice because this function isn't an inline and isn't called from the same file as it is defined in, so it is probably too hard for gcc to do the strict aliasing thing. David.