diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-04-13 18:09:20 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-12-29 16:48:51 -0300 |
commit | 283cd0eca5b50a77372f2f201acd24cd223db310 (patch) | |
tree | 8dee2fbab353697c67f2fbdb6d4b7b2137414478 /nptl/tst-kill4.c | |
parent | 5c2728e451fa15b97b5161ffd20cf647b54f39e6 (diff) | |
download | glibc-azanella/bz23960-dirent.tar.gz glibc-azanella/bz23960-dirent.tar.xz glibc-azanella/bz23960-dirent.zip |
linux: Set internal DIR filepos as off64_t (BZ #23960, BZ #24050) azanella/bz23960-dirent
It allows to obtain the expected entry offset on telldir and set it correctly on seekdir on platforms where long int is smaller than off64_t. On such cases opendir creates a map entry between the DIR d_off offset and the returned long int (the telldir return value). seekdir will then set the correct offset from the internal list using the telldir as the list key. It also removes the overflow check on readdir and the returned value will be truncated by the non-LFS off_t size. As Joseph has noted in BZ #23960 comment #22, d_off is an opaque value and since telldir/seekdir works regardless of the returned dirent d_off value. Finally it removes the requirement to check for overflow values on telldir (BZ #24050). Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc-linux-gnu, and arm-linux-gnueabihf.
Diffstat (limited to 'nptl/tst-kill4.c')
0 files changed, 0 insertions, 0 deletions