PR_Select() fails test selct_er

NEW
Assigned to

Status

7 years ago
7 years ago

People

(Reporter: mi+mozilla, Assigned: wtc)

Tracking

4.8.8
x86_64
FreeBSD

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
The (unpatched) sect_er.c test hangs indefinitely, because PR_Select() on FreeBSD fails to detect, that it was passed an already closed file-descriptor.
(Reporter)

Comment 1

7 years ago
Created attachment 539724 [details]
A test program calling socket() and select() directly, without NSPR

The attached program behaves the same on both Linux and FreeBSD. On both systems, the output is:

% ./select-test 
Trying to read-select on closed read-fd
select: Bad file descriptor
% ./select-test foo
Trying to write-select on closed write-fd
select: Success
% ./select-test foo bar
Trying to read-select on closed TCP-socket
select: Success

This suggests, the test should be failing on Linux as well (select-ing on an already closed TCP-socket returns success instead of reporting bad file descriptor), but it does not...
You need to log in before you can comment on or make changes to this bug.