| To: | Sridhar Samudrala <sri@xxxxxxxxxx> |
|---|---|
| Subject: | Re: net/sctp/sm_make_chunk.c alignment problems on parisc64 |
| From: | "David S. Miller" <davem@xxxxxxxxxx> |
| Date: | Thu, 18 Sep 2003 19:55:25 -0700 |
| Cc: | acme@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, lksctp-developers@xxxxxxxxxxxxxxxxxxxxx |
| In-reply-to: | <Pine.LNX.4.44.0309171559540.3831-100000@xxxxxxxxxxxxxxxxxxxxx> |
| References: | <20030912164628.GF8713@xxxxxxxxxxxxxxxx> <Pine.LNX.4.44.0309171559540.3831-100000@xxxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Wed, 17 Sep 2003 16:06:18 -0700 (PDT)
Sridhar Samudrala <sri@xxxxxxxxxx> wrote:
> I don't see this problem on i386, ia64 or ppc64. Can someone
> familiar with parisc64 provide more details or submit a a patch to
> fix this problem?
As an example, if you have an structure member of type "char":
struct foo {
char a;
char b[4];
};
And then try to do something like this:
struct foo *p;
unsigned int *v;
v = (unsigned int *) (&p->b[0]);
*v = 0;
The build is going to explode on parisc because this simply is not
allowed. You cannot access a structure member as an object which
has larger alignment than is guarenteed for the type that member
has.
In the above example we're trying to access with 'unsigned int'
alignment a member which is only guarenteed to have the alignment
for a 'char'.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: ipt_physdev.c alignment problems on parisc64, David S. Miller |
|---|---|
| Next by Date: | Re: linux 2.4 routing algorithm?, David S. Miller |
| Previous by Thread: | Re: net/sctp/sm_make_chunk.c alignment problems on parisc64, Sridhar Samudrala |
| Next by Thread: | Re: net/sctp/sm_make_chunk.c alignment problems on parisc64, Sridhar Samudrala |
| Indexes: | [Date] [Thread] [Top] [All Lists] |