From owner-freebsd-alpha Tue Jan 12 22:05:08 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA18275 for freebsd-alpha-outgoing; Tue, 12 Jan 1999 22:05:08 -0800 (PST) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from mail.sat.t.u-tokyo.ac.jp (dryad.sat.t.u-tokyo.ac.jp [133.11.156.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA18259 for ; Tue, 12 Jan 1999 22:05:06 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from ett.sat.t.u-tokyo.ac.jp (ett.sat.t.u-tokyo.ac.jp [133.11.156.43]) by mail.sat.t.u-tokyo.ac.jp (8.8.6/3.4Wbeta6-SAT1.0) with ESMTP id PAA29572 for ; Wed, 13 Jan 1999 15:04:31 +0900 (JST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from localhost by ett.sat.t.u-tokyo.ac.jp (8.8.8/sat-V0.6) id PAA29239; Wed, 13 Jan 1999 15:04:30 +0900 (JST) To: freebsd-alpha@FreeBSD.ORG Subject: fix for unaligned access X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7:#j7i14gu$ jgR\S*&C3R/pJX Date: Wed, 13 Jan 1999 15:04:30 +0900 From: Hidetoshi Shimokawa X-Dispatcher: imput version 980905(IM100) Lines: 49 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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? /\ 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