Repository navigation
0.23.1: a handle is retired before its descriptor is closed; one release closes; a released handle's stream is no stream - #47
Merged
Conversation
…ase closes; a released handle's stream is no stream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The construction openkal-linux#53 reports is this implementation's too:
kal_net_close,kal_net_close_listenerandkal_datagram_closeclosed the descriptor and then retired the handle, so a file or a connection another context opened between the two took the number with the old generation and was left with a stale handle; its stream was answered as zero, standard input.okm::release, which retires and then closes (src/handle.h).kal_fs_streamandkal_net_streamanswer a handle that names no live descriptor with a word no descriptor has; a transfer upon it reportskal_err_invalid.tests/a_released_handle_is_stale_before_its_number_is_free.cpp: one context accepts and closes connections, one connects and closes, one opens, reads and closes a file; every read returns the file. On openkal-linux the same test finds 94 stale files in 3.4 million opens without the change, none with it.