From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8606 invoked by alias); 16 Jul 2002 17:19:09 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 8407 invoked from network); 16 Jul 2002 17:19:05 -0000 Received: from unknown (HELO mail.speakeasy.net) (216.254.0.212) by sources.redhat.com with SMTP; 16 Jul 2002 17:19:05 -0000 Received: (qmail 9689 invoked from network); 16 Jul 2002 17:19:04 -0000 Received: from unknown (HELO pippin.tausq.org) ([64.81.244.94]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 16 Jul 2002 17:19:04 -0000 Received: by pippin.tausq.org (Postfix, from userid 1000) id DE1E1CE04E; Tue, 16 Jul 2002 10:22:55 -0700 (PDT) Date: Tue, 16 Jul 2002 13:43:00 -0000 From: Randolph Chung To: John David Anglin Cc: parisc-linux@parisc-linux.org, gcc@gcc.gnu.org Subject: Re: [parisc-linux] gcc-3.[02] alignment problem Message-ID: <20020716172255.GM8724@tausq.org> Reply-To: Randolph Chung References: <200207161701.g6GH1D03023385@hiauly1.hia.nrc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200207161701.g6GH1D03023385@hiauly1.hia.nrc.ca> User-Agent: Mutt/1.4i X-PGP: for PGP key, see http://www.tausq.org/pgp.txt X-GPG: for GPG key, see http://www.tausq.org/gpg.txt X-SW-Source: 2002-07/txt/msg00692.txt.bz2 In reference to a message from John David Anglin, dated Jul 16: > > These messages are coming from the assembler (remove "-pipe"). The > > first is from "std %r4,44(%r3)". The offset "44" is not correct for > > a store double. This is probably a problem with pointer arithmetic > > in the source. > > Check the definition of RTA_ALIGNTO in linux/rtnetlink.h. ah, this is not it, but i see what it is now. include/linux/tcp_diag.h defines: struct tcpdiag_sockid { __u16 tcpdiag_sport; __u16 tcpdiag_dport; __u32 tcpdiag_src[4]; __u32 tcpdiag_dst[4]; __u32 tcpdiag_if; __u32 tcpdiag_cookie[2]; #define TCPDIAG_NOCOOKIE (~0U) }; the code goes on to do: *((struct sock **)&r->id.tcpdiag_cookie) = sk; and sk != *((struct sock **)&req->id.tcpdiag_cookie[0])) even tho tcpdiag_cookie looks like it can be 64-bit aligned in the struct, it appears that it isn't.... the "vomit grade hack" alan mentioned in another post is that in our tree, we have: struct tcpdiag_sockid { __u16 tcpdiag_sport; __u16 tcpdiag_dport; __u32 tcpdiag_src[4]; __u32 tcpdiag_dst[4]; __u32 tcpdiag_if; #if defined (__hppa__) && defined (__LP64__) char * parisc_hack_to_align_tcpdiag_cookie; #endif __u32 tcpdiag_cookie[2]; #define TCPDIAG_NOCOOKIE (~0U) }; why is the offset of tcpdiag_cookie[0] 44 and not 40? randolph -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/