This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
- From: "thunter at erggroup dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 2 Oct 2007 05:45:40 -0000
- Subject: [Bug libc/5070] glibc-2.5: ../sysdeps/unix/sysv/linux/check_pf.c:68: make_request: Assertion fails
- References: <20070926094026.5070.thunter@erggroup.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From thunter at erggroup dot com 2007-10-02 05:45 -------
ARM is one of the architectures supported by glibc. You may not like it, but it
is a fact.
Independently of the architecture, the padding done is not valid. You can't
(and shouldn't) make any assumption about the alignment and associated padding
done by the compiler for any architecture. GCC is free to change the alignment
rules in any future versions. It seems rather silly to have the assert() which
is meant to verify at runtime that your invalid assumption holds true.
I would also suggest that you don't use structures to format packets for
networking. Packets for networking should be treated as byte streams to avoid
any alignment/padding/byte-order issues. A standard way of doing this is
something like this:
unsigned char buf[MaxPacketSize];
unsigned char *bp;
int skt;
size_t len;
...
bp = buf;
*bp++ = ...;
*bp++ = ...;
*bp++ = ...;
...
len = send(skt, buf, bp - buf, 0);
...
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|WONTFIX |
http://sourceware.org/bugzilla/show_bug.cgi?id=5070
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.