From owner-freebsd-alpha Wed Jan 13 14:31:13 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA13353 for freebsd-alpha-outgoing; Wed, 13 Jan 1999 14:31:13 -0800 (PST) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from burka.rdy.com (burka.rdy.com [205.149.163.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA13343 for ; Wed, 13 Jan 1999 14:31:11 -0800 (PST) (envelope-from dima@burka.rdy.com) Received: (from dima@localhost) by burka.rdy.com (8.9.1/RDY&DVV) id OAA36952; Wed, 13 Jan 1999 14:30:02 -0800 (PST) Message-Id: <199901132230.OAA36952@burka.rdy.com> Subject: Re: fix for unaligned access In-Reply-To: <19990113150430Q.simokawa@sat.t.u-tokyo.ac.jp> from Hidetoshi Shimokawa at "Jan 13, 1999 3: 4:30 pm" To: simokawa@sat.t.u-tokyo.ac.jp (Hidetoshi Shimokawa) Date: Wed, 13 Jan 1999 14:30:02 -0800 (PST) Cc: freebsd-alpha@FreeBSD.ORG X-Class: Fast Organization: HackerDome Reply-To: dima@best.net From: dima@best.net (Dima Ruban) X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hidetoshi Shimokawa writes: > Here is a fix for mail and traceroute not to do unaligned access. > A fix for mail is obtained from NetBSD and that I posted before, but > it has not been commited yet. > > Can I commit these two patch before branch? patch for mail looks good. About traceroute: wouldn't it be simplier to fix gcc? > > /\ Hidetoshi Shimokawa > \/ simokawa@sat.t.u-tokyo.ac.jp > PGP public key: finger -l simokawa@sat.t.u-tokyo.ac.jp > > > Index: usr.bin/mail/strings.c > =================================================================== > RCS file: /pub/FreeBSD-CVS/src/usr.bin/mail/strings.c,v > retrieving revision 1.1.1.1 > diff -u -r1.1.1.1 strings.c > --- strings.c 1994/05/27 12:32:07 1.1.1.1 > +++ strings.c 1998/11/29 06:41:14 > @@ -64,8 +64,8 @@ > int index; > > s = size; > - s += 3; > - s &= ~03; > + s += (sizeof (char *) - 1); > + s &= ~(sizeof (char *) - 1); > index = 0; > for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { > if (sp->s_topFree == NOSTR && (STRINGSIZE << index) >= s) > Index: usr.sbin/traceroute/Makefile > =================================================================== > RCS file: /pub/FreeBSD-CVS/src/usr.sbin/traceroute/Makefile,v > retrieving revision 1.9 > diff -u -r1.9 Makefile > --- Makefile 1998/09/19 22:42:13 1.9 > +++ Makefile 1999/01/13 05:58:10 > @@ -14,6 +14,12 @@ > CLEANFILES+= version.c > > TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute > + > +.if ${MACHINE_ARCH} == "alpha" > +# gcc builtin memcpy causes unaligned access > +CFLAGS+= -fno-builtin > +.endif > + > CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl > .PATH: ${TRACEROUTE_DISTDIR} > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-alpha" in the body of the message > -- dima To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message