lseek() past EOF then read() crashes
Nick Withers
nick.withers at anu.edu.au
Tue Aug 13 06:49:50 UTC 2013
Hey all,
(I'm not on the -devel list; please include me in any possible replies,
if you'd like me to see them)
I seem to be able to reliably trigger an exception when using lseek() to
jump past the EOF of a file on IMFS, followed by a read().
I believe this should not occur, per
http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html : "No
data transfer shall occur past the current end-of-file. If the starting
position is at or after the end-of-file, 0 shall be returned. If the
file refers to a device special file, the result of subsequent read()
requests is implementation-defined"
This is on an MVME3100 (PowerPC) with Git HEAD RTEMS, circa 2013-08-12.
I've got a stack trace (not totally sure I trust it) if someone'd like?
Perhaps lseek() isn't supported on IMFS? The file in question's been
rtems_tarfs_load()ed there, if that could make a difference...?
If it's meant to work, would you like me to file a bug report with the
stack trace?
--
Nick Withers
Embedded Systems Programmer
Room 2.26, Building 57
Department of Nuclear Physics
Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)
eMail: nick.withers at anu.edu.au
Phone: +61 2 6125 2091
Mobile: +61 414 397 446
More information about the devel
mailing list