The OS is Red Hat Linux 5.2 (kernel 2.0.36, glibc 2.0). The test machine is dewey.mcom.com. The NSPR release is 3.1.1. When running the sockopt test, debug build, I get this assertion failure: Assertion failure: (-1 == rv) || (sizeof(ttl) == length), at ptio.c:2498 The value of 'rv' is 0, and the value of 'length' is 4. Since 'ttl' is PRUint8, sizeof(ttl) is 1. This appears to be a bug in glibc 2.0. Before we call getsockopt, we set 'length' to 1 (the size of 'ttl'). On return, getsockopt sets 'length' to 4, larger than what we allocated.
This problem doesn't show up on the currently supported Linux platform, with 2.2 kernel and glibc 2.x (> 2.0). This should be closed as invalid.