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 D64EC404EA for ; Tue, 15 Oct 2002 12:47:01 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g9FGl1K05285 for axp-list@listman.redhat.com; Tue, 15 Oct 2002 12:47:01 -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 g9FGl1f05279 for ; Tue, 15 Oct 2002 12:47:01 -0400 Received: from ellpspace.math.ualberta.ca (ellpspace.math.ualberta.ca [129.128.207.67]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g9FGQUw31979 for ; Tue, 15 Oct 2002 12:26:30 -0400 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.11.6/8.11.6) id g9FGkhB19268 for axp-list@redhat.com; Tue, 15 Oct 2002 10:46:43 -0600 Date: Tue, 15 Oct 2002 10:46:43 -0600 From: Michal Jaegermann To: axp-list@redhat.com Subject: Re: unaligned traps question Message-ID: <20021015104643.A19134@ellpspace.math.ualberta.ca> References: <01da01c273e4$d5c57320$35de2b09@Viswanadha> <3DAB7754.F6F5D8B0@voicenet.com> <02101511393604.01593@shadowfax.middleearth> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <02101511393604.01593@shadowfax.middleearth>; from france@handhelds.org on Tue, Oct 15, 2002 at 11:39:36AM -0400 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: On Tue, Oct 15, 2002 at 11:39:36AM -0400, George France wrote: > > Alignment traps are not a serious bug but will make the code run significantly > slower. They are mostly really annoying. Let me add an example when such trap indictates something more serious instead of beeing just an instance of a somewhat careless programming. Cases like that were observed in "real life" instead of beeing artificially constructed. A library provides a variable of an 'int' type and another program is accessing it as 'long'. That bug does not show up on x86 as there sizeof(int) and sizeof(long) happens to be the same. When this is not true, like on Alpha but not only, then either you are scribbling where you should not or you are reading into your program some unexpected/random values. Direct effects will depend how important really were these extra bits in a particular situation. If you are lucky then that library variable is NOT aligned on a long boundary so attempts to access it as long generate unaligned traps. These are, of course, symptoms as the real bug is something else. If you recompile a loader may align library variables differently and traps may vanish; the bug is still there. There are other possible bugs which follow roughly the same pattern. Michal