From owner-freebsd-alpha Sat Dec 22 22:38: 9 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id 98D6C37B405 for ; Sat, 22 Dec 2001 22:38:05 -0800 (PST) Received: from mailhost.feral.com (mjacob@mailhost.feral.com [192.67.166.1]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id fBN6btY02355; Sat, 22 Dec 2001 22:37:56 -0800 (PST) (envelope-from mjacob@feral.com) Date: Sat, 22 Dec 2001 22:37:55 -0800 (PST) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: Bernd Walter Cc: Wilko Bulte , freebsd-alpha@FreeBSD.ORG Subject: Re: FreeBSD 4.5 alpha buyglet In-Reply-To: <20011223032201.GA61241@cicely9.cicely.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, 23 Dec 2001, Bernd Walter wrote: > On Sat, Dec 22, 2001 at 05:12:32PM -0800, Matthew Jacob wrote: > > > > >Yes, see Message-ID: <20011221175252.A25617@freebie.xs4all.nl> > > >on -alpha. > > > > Ooops- so right you are. Anyway, I looked at this just a bit- seems a compiler > > error to me- it shouldn't be generating ldq's for those tags because they > > couldn't possibly be at 8 byte offsets given the structures involved. Oh well. > > The two variables it fails on are defined as beeing long but only 32 bit > aligned. I'm more about beleaving the sysctl tranfer misaligns them. But I > have currently no system where I see this problem so I can't be shure. The > sysctl receive buffer is malloc'ed so it should be 64 bit aligned. Hmm? I used gdb to find the misaligned reference to be, e.g.: ***> if (ifm->ifm_data.ifi_metric) printf(" metric %ld", ifm->ifm_data.ifi_metric); ***> if (ifm->ifm_data.ifi_mtu) printf(" mtu %ld", ifm->ifm_data.ifi_mtu); putchar('\n'); struct if_msghdr { u_short ifm_msglen; /* to skip over non-understood messages */ u_char ifm_version; /* future binary compatability */ u_char ifm_type; /* message type */ int ifm_addrs; /* like rtm_addrs */ int ifm_flags; /* value of if_flags */ u_short ifm_index; /* index for associated ifp */ offset: 14 struct if_data ifm_data;/* statistics and other data about if */ }; ... struct if_data { /* generic interface information */ u_char ifi_type; /* ethernet, tokenring, etc */ u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */ u_char ifi_addrlen; /* media address length */ u_char ifi_hdrlen; /* media header length */ u_char ifi_recvquota; /* polling quota for receive intrs */ u_char ifi_xmitquota; /* polling quota for xmit intrs */ offset: 6 u_long ifi_mtu; /* maximum transmission unit */ u_long ifi_metric; /* routing metric (external only) */ u_long ifi_baudrate; /* linespeed */ So, if gdb was right and dereferencing ifi_mtu or ifi_metric is generating a ldq, then the compiler seems to be broken. -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message