From: Tom Michiels <tomm@godard.cs.kuleuven.ac.be>
Subject: Re: unaligned trap help
Date: 1998/12/17 [thread overview]
Message-ID: <913892314.564529@marvin> (raw)
In-Reply-To: 8qPBZSm00WB40YO1s0@andrew.cmu.edu
Timothy K Canfield <tkc+@andrew.cmu.edu> wrote:
> configuring the network using DHCP i recieve unaligned trap. This also
I don't know about redhat, but if it uses - like debian - dhcpcd 0.70,
then these unaligned traps are caused by long-pointer-casts:
u_long foo;
u_char *bar;
...
foo= *((u_long *) bar);
If the char-pointer is not 64-bit aligned, this gives an unaligned
access violation. I replaced these instructions by
memcpy(&foo,bar,sizeof(long));
to get rid of the unaligned accesses. But this is ofcourse not an optimal
way of solving the problem. Aren't there any macros definedto do this
type of unaligned long copying?
Tom
next prev parent reply other threads:[~1998-12-17 5:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-08 5:00 unaligned trap help Timothy K Canfield
1998-12-08 5:00 ` Charles E Taylor IV
1998-12-17 5:00 ` Mike Powers
1998-12-08 5:00 ` 97117071
1998-12-14 5:00 ` unaligned trap help - same pb Claude R. CIRBA
1998-12-22 5:00 ` remove_me
1998-12-17 5:00 ` Tom Michiels [this message]
1998-12-17 5:00 ` unaligned trap help Tom Michiels
1998-12-18 5:00 ` Paul Vlaar
1998-12-22 5:00 ` Tom Michiels
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox