Hi,

As explained by Steve Langasek (thanks a lot!), this bug is a result of a recent change in gcc, which has switched from using glibc's memcpy() to an optimized inline memcpy() routine, which takes advantage of the knowledge about the alignment of source and destination, which gcc is tracking. In that case the cast from sockaddr to sockaddr_in is a problem. The sockaddr structure consists of a short (2 bytes) and an array of 14 chars, so it is allowed to be aligned (and is, in fact, aligned) on the 2-byte boundary, while the largest element of sockaddr_in is 4 bytes, so it is expected to be aligned on a 4-byte boundary. This alignment mismatch is what causing a bus error. According to Steve, C language specification makes such a cast illegal, so it needs to be fixed.

Best regards,

Jurij Smakov                                        [EMAIL PROTECTED]
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to