From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id 42D184260A for ; Thu, 17 Oct 2002 18:17:25 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g9HMHPI31814 for axp-list@listman.redhat.com; Thu, 17 Oct 2002 18:17:25 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g9HMHOf31810 for ; Thu, 17 Oct 2002 18:17:24 -0400 Received: from m3102.hostcentric.net (m3102.hostcentric.net [216.157.79.140]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g9HLuUw30298 for ; Thu, 17 Oct 2002 17:56:33 -0400 Received: (qmail 12922 invoked by alias); 17 Oct 2002 22:17:16 -0000 Received: from unknown (HELO m3001.hostcentric.net) (216.157.79.237) by 0 with SMTP; 17 Oct 2002 22:17:16 -0000 Received: (qmail 22323 invoked by alias); 17 Oct 2002 22:17:16 -0000 Received: from unknown (HELO Viswanadha) (32.97.110.142) by 0 with SMTP; 17 Oct 2002 22:17:16 -0000 Message-ID: <01d001c2762a$ecdbffa0$35de2b09@Viswanadha> From: "Ram Viswanadha" To: References: <01da01c273e4$d5c57320$35de2b09@Viswanadha> <02101511334803.01593@shadowfax.middleearth> Subject: Re: unaligned traps question Date: Thu, 17 Oct 2002 15:17:04 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: Hi Everyone, Thank you all for you answers and help. George, thank you for your code, I actually used the code by Sean Hunter available at http://linux.iol.unh.edu/linux/alpha/faq/iol_faq.html#9 There was only one instance in our tests that caused unaligned trap. The runtime code, binary data generated did not produce any unaligned traps. What we had was: static uint8_t storage[100000] testUTrie(){ utrie_serialize(...,storage,sizeof(storage),..) } ............ source was passed to a library function that cast the uint8_t to internal structure ... struct UTrieHeader { uint32_t signature; uint32_t options; int32_t indexLength; int32_t dataLength; }; utrie_serialize(...., uint8_t* data,int32_t capacity,....) UTrieHeader* header = (UTrieHeader*) data; header->signature =0x54726965; /** this line caused unaligned trap **/ } so the fix was to change storage to struct{ double bogus; /* needed for aligining the storage */ uint8_t storage[10000000]; } storageHolder; The expectation of the API is that input param "data" is aligned. Some of our tools still cause unaligned traps but that is build time issue and we decided we can live with the performance degradation. Regards, Ram --------------------------------------------------- Ram Viswanadha International Components For Unicode GCoC San Jose IBM ----- Original Message ----- From: "George France" To: ; "Ram Viswanadha" Sent: Tuesday, October 15, 2002 8:33 AM Subject: Re: unaligned traps question > Hello Ram, > > Attached is a program that will help you find the alignment > problems in ICU. > > Best Regards, > > > --George > > > On Monday 14 October 2002 20:50, Ram Viswanadha wrote: > > Hi everyone, > > ICU (http://oss.software.ibm.com/icu/) libraries when compiled with stock > > RH 6.2 kernel and GCC used to produce unaligned traps in some of the tools. > > I upgraded to RH 7.2 (stock kernel and GCC) and now I am not seeing any > > unaligned trap messages. > > I read Rich Payne's mails in the archives and they suggest that the > > problems are in users code not in the kernel. > > So there are two possibilities, since my code has not changed: > > a) The kernel has become more lenient and is not producing any unaligned > > trap messages. > > b) GCC had a bug which produced unaligned data which has hence been fixed. > > > > Which of the above is true, or is there a better explanation to the above > > symptom. > > > > Thank you very much for your answer. > > > > Regards, > > > > Ram > > --------------------------------------------------- > > Ram Viswanadha > > International Components For Unicode > > GCoC San Jose > > IBM > > > > > > > > _______________________________________________ > > Axp-list mailing list > > Axp-list@redhat.com > > https://listman.redhat.com/mailman/listinfo/axp-list >