alpha net-yy test failures due to port decode errors

Masatake YAMATO yamato at redhat.com
Tue Mar 3 05:17:56 UTC 2015


On Mon, 2 Mar 2015 23:54:19 -0500, Mike Frysinger <vapier at gentoo.org> wrote:
> On 03 Mar 2015 13:32, Masatake YAMATO wrote:
>> On Mon, 2 Mar 2015 23:20:12 -0500, Mike Frysinger wrote:
>> > On 03 Mar 2015 12:48, Masatake YAMATO wrote:
>> >> On Tue, 3 Mar 2015 03:13:11 +0300, "Dmitry V. Levin" wrote:
>> >> >> > --- a/socketutils.c
>> >> >> > +++ b/socketutils.c
>> >> >> > @@ -114,7 +114,7 @@ receive_responses(const int fd, const unsigned long inode,
>> >> >> >  		  const char *proto_name,
>> >> >> >  		  bool (* parser) (const char *, const void *, int, const unsigned long))
>> >> >> >  {
>> >> >> > -	static char buf[8192];
>> >> >> > +	static long buf[8192 / sizeof(long)];
>> >> >> >  	struct sockaddr_nl nladdr = {
>> >> >> >  		.nl_family = AF_NETLINK
>> >> >> >  	};
>> >> 
>> >> ??? What does thie mean?
>> >> The addresses of long buf and char buf differs?
>> > 
>> > afaict, it only changes alignment
>> 
>> alignment of buf itself?
> 
> correct.  a char[] can have any alignment while long[] has to have at least 
> sizeof(long) on most systems (i.e. typically 4 on 32bit systems and 8 on 64bit).
> -mike

Thank you very much...a bit difficult for me. My understating is that I can
observe the difference with following code:

      static char buf[...];
      printf("%p\n", buf);

      static long buf[...];
      printf("%p\n", buf);

Masatake YAMATO




More information about the Strace-devel mailing list