This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

pread, pwrite linux implementation does not conform to Single UnixSpecification


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]