gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUnet-developers] sizeof HELO Message wrong


From: Christian Grothoff
Subject: Re: [GNUnet-developers] sizeof HELO Message wrong
Date: Fri, 25 Jul 2003 19:33:06 +0200

Am Freitag, 25. Juli 2003 14:23 schrieben Sie:
> Christian Grothoff wrote:
> >Hmm. Best reason I can see would be the compiler doing 64-bit alignment.
> > But if they are using a binary package that works on other systems, I'll
> > declare myself puzzled. The check just tests if the compiler packed the
> > struct the way we expect it to, which is without any holes.
>
> That "not too many more details" is:
>
> $uname -a
> Linux skye 2.4.19 #5 Fri May 9 20:48:01 EDT 2003 alpha GNU/Linux
>
> It is very possible that the compiler did 64-bit alignment. :-)
>
> Have anybody used gnunet on a 64-bit processor ever?

Not to my knowledge. And fixing all structs to be 64-bit aligned would break 
the protocol (they are 32-bit aligned, which was pretty much as much as we 
could reasonably do). Now gcc can be tweaked to align things at 32-bit 
boundaries (definitely with gcc extensions like __attribute__(packed) or 
something like that), but I wonder if there's not a better way to do this 
(without making the code too ugly).

Either way, the alignment is definitely to blame if this is a 64 bit 
architecture. Can you check if there are any obscure gcc flags that may help? 
Otherwise we'll have to do something to the code...

Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]