Date: Fri, 16 Feb 2001 21:43:10 +0100 From: "Peter Blok" <Peter.Blok@inter.NL.net> To: "'Terry Lambert'" <tlambert@primenet.com> Cc: "'Andrew Gallatin'" <gallatin@cs.duke.edu>, <freebsd-alpha@FreeBSD.ORG> Subject: RE: unaligned access Message-ID: <000d01c09859$1383a600$8a02a8c0@ntpc> In-Reply-To: <200102160013.RAA10748@usr08.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Just an update. I have found two problems. 1) mpd-netgraph has its own alloc routine that doesn't roundup the size to a 64 bit boundary. Easy to fix. 2) The other one was in the byte swapping area. That one puzzled me for a while. It turns out to be a compiler issue. When you allocate a pointer to a 33 bit long locally on the stack, it is not always aligned. The allocation was not done in the scope of the function, but within another scope under a case statement. I have removed the definition to the scope of the function, to check its value with gdb and it suddenly worked! I'm not getting any errors any more, but it still doesn't work yet. The next problem looks related to the select system-call. Any know problems with it? Peter -----Original Message----- From: owner-freebsd-alpha@FreeBSD.ORG [mailto:owner-freebsd-alpha@FreeBSD.ORG]On Behalf Of Terry Lambert Sent: Friday, February 16, 2001 01:14 To: Peter.Blok@inter.NL.net Cc: 'Terry Lambert'; 'Andrew Gallatin'; freebsd-alpha@FreeBSD.ORG Subject: Re: unaligned access > Thanks for the hints. One big cause was the embedded alloc routines, that > doesn't do aligning. The next buffer allocated was unaligned, because the > previous size was unaligned. I haven't looked closely enough to the > structures. I also had one unaligned access in a varargs construction. > Haven't found the cause yet. Andrew is the "big guns" when it comes to Alpha work; I'm just someone on the sidelines. But remember that your problem is not the fixups themselves, but that the code does not operate in the presence of fixups, which it should. This implies the operational problem has nothing to do with the fixups, and is instead related to some other problem. My money is still on structure packing in the user space code; if you ensure that it isn't a problem by using "#pragma pack(1)", then I suspect your code will work, even though the console will still whine about unaligned access errors. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000d01c09859$1383a600$8a02a8c0>