aboutsummaryrefslogtreecommitdiff
path: root/math/test-tgmath.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-04-08 10:39:44 +0200
committerFlorian Weimer <fweimer@redhat.com>2025-04-08 10:39:44 +0200
commit4fa959d13d21b8f56a43aa0a416100303736c55c (patch)
tree52f858a3a0e9c66eb53ef8c0415fbf019b355836 /math/test-tgmath.c
parentfb3d821afa86bc9b2e07f0140e7788e421769589 (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
stdio-common: In tst-setvbuf2, close helper thread descriptor only if openedHEADmaster
The helper thread may get canceled before the open system call succeds. Then ThreadData.fd remains zero, and eventually the xclose call in end_reader_thread fails because descriptor 0 is not open. Instead, initialize the fd member to -1 (not a valid descriptor) and close the descriptor only if valid. Do this in a new end_thread helper routine. Also add more error checking to close operations. Fixes commit 95b780c1d0549678c0a244c6e2112ec97edf0839 ("stdio: Add more setvbuf tests").
Diffstat (limited to 'math/test-tgmath.c')
0 files changed, 0 insertions, 0 deletions