From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 30134 invoked from network); 8 Dec 1998 00:47:45 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 8 Dec 1998 00:47:45 -0000 Received: from ns.blueskystudios.com (ns.blueskystudios.com [209.208.142.100]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id TAA15252 for ; Mon, 7 Dec 1998 19:42:14 -0500 Received: from scotia ([199.165.156.54]) by ns.blueskystudios.com (Netscape Mail Server v2.0) with SMTP id AAA10434; Mon, 7 Dec 1998 19:39:39 -0500 Sender: hadsell@blueskystudios.com (Dick Hadsell) Message-ID: <366C766D.3D0D@blueskystudios.com> Date: Mon, 07 Dec 1998 19:44:29 -0500 From: Richard Hadsell Organization: Blue Sky | VIFX X-Mailer: Mozilla 3.01 (X11; I; IRIX 6.2 IP22) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: How do I find/fix unaligned accesses? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eric Ding wrote: > > thanks for the tips... ok, so now I'm looking at > > unaligned trap at 0000015556b9d360: 0000000120d9740c 27 1 > > and the variable being accessed is a double, which means it must be aligned > on 4 byte boundaries, right? But it's correct, then, isn't it? That is, > 0x0000000120d9740c is divisible by 4, so why is there still an error? Doubles are 8 bytes. I treat unaligned traps just like any memory error. I usually find access through a pointer that was never initialized, has been clobbered by some other errant code, or has been overwritten because it was on the heap but the structure it belonged to has been freed. There are other ways to get bad pointers, but I rarely find that the compiler generated a bad pointer. -- Dick Hadsell 914-381-8400 x5446 Fax: 914-381-9790 Reply-to: hadsell@blueskystudios.com Blue Sky | VIFX http://www.bluesky-vifx.com 1 South Road, Harrison, NY 10528