diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2025-03-14 10:18:21 -0400 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2025-03-14 12:28:05 -0400 |
commit | 10af00f7a135c85796a9c4c75228358b8898da5c (patch) | |
tree | 47d252f4969b27773b8b93e82e59a74498458720 /sysdeps/stub/remove.c | |
parent | 409668f6e88b63607e2cea29b3ce2a1c25f04bf1 (diff) | |
download | glibc-master.zip glibc-master.tar.gz glibc-master.tar.bz2 |
The fread race checker looks for EOF in every thread, which is incorrect
since threads calling fread successfully could lag behind and read the
EOF condition, resulting in multiple threads thinking that they
encountered an EOF.
Only look for EOF condition if fread fails to read a char. Also drop
the clearerr() since it could mask the failure of another reader, thus
hiding a test failure.
Finally, also check for error in the stream for completeness.
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'sysdeps/stub/remove.c')
0 files changed, 0 insertions, 0 deletions