pread, pwrite linux implementation does not conform to Single Unix Specification

Gerhard Tonn TON@de.ibm.com
Wed Jul 10 04:00:00 GMT 2002


Hi,
we have recently experienced problems with the ltp (linux test project)
testsuite, when passing a negative value as offset to pread and pwrite. The
functions don't return EINVAL as specified by
http://www.opengroup.org/onlinepubs/007908799/xsh/write.html and
http://www.opengroup.org/onlinepubs/007908799/xsh/read.html  respectively,
but return EFBIG or no error at all. This problem appears on all platforms
using the sysdeps/unix/sysv/linux/ default implementation. The
implementation doesn't check for negative values and use the
__LONG_LONG_PAIR macro to convert from an off_t to a loff_t, which doesn't
do any sign extension. Could that be fixed?

Regards / Mit freundlichen Gruessen
Gerhard

Gerhard Tonn, Linux for eServer Development, +(49)-7031-16-4716, Lotus
Notes: ton@ibmde,
   Internet: ton@de.ibm.com



More information about the Libc-alpha mailing list