Describe the bug
If a file descriptor fd1 is duplicated to a new fd2, then fd2 is closed, the fd1 file description is deleted from the internal table, while the fd2 file description remains. It appears to be caused by the duplicated table entry using the same internal filedes value, so when the second entry is closed, it deletes the first entry based on the wrong filedes.
How To Reproduce
This is the same test from #970, but the order of close() is swapped.
Describe the bug If a file descriptor
fd1
is duplicated to a newfd2
, thenfd2
is closed, thefd1
file description is deleted from the internal table, while thefd2
file description remains. It appears to be caused by the duplicated table entry using the same internalfiledes
value, so when the second entry is closed, it deletes the first entry based on the wrongfiledes
.How To Reproduce This is the same test from #970, but the order of
close()
is swapped.Your environment Please run the following in the environment where the problem happened and paste the output.