[krbdev.mit.edu #6308] Alignment problem in resolver test

Ezra Peisach via RT rt-comment at krbdev.mit.edu
Sat Dec 27 15:17:36 EST 2008


Okay - I have been able to reproduce the problem on one MIT's solaris
machines - but only when using gcc....

This is gcc version 3.4.3 on a machine running  Solaris 10 3/05
s10_74L2a SPARC.

I modified the code to allow me to vary the alignment of the memory.
Sure enough, gethostbyaddr segfaults in the nss library.

Now - why is this only w/ gcc and not sunsoft's compiler - I could not
tell you.

Looking at the opensolaris library source for libnss - I do see that
there is a path where the pointer to the char * is assigned a struct
in_addr *.  

See IN6_INADDR_TO_V4MAPPED macro in /usr/include/netinet/in.h.

The error does not appear to be an optimization issue...

Now - why is gcc screwing up? I will need to investigate... I will have
to look at the assembly code to see what is going on....  

So - can you please confirm that your problem is observed w/ gcc?
Ezra



More information about the krb5-bugs mailing list