Repository navigation
Conversation
Pipe.open returns a pipe whose source and sink channels each own a native file descriptor until close. Pipe itself is not Closeable, so Pulse never allocated those channels and not closing them was missed. source and sink return the channels allocated by open. read and write may throw IOException without closing the channel. make -C infer/tests/codetoanalyze/java/pulse test
Contributor
|
I need more details about the model, how the objects look like, etc. |
Contributor
Author
|
Hi Dulma, Pipe.open() creates three objects:
The channels are stored on the Pipe under the model fields __infer_pipe_source and __infer_pipe_sink. source() and sink() load those same values, so closing pipe.source() closes the channel that open() allocated, and a later source() call returns that same channel. SourceChannel.read and SinkChannel.write are modeled as uses that may throw IOException and do not close the channel. Without that, Pulse treated them as unknown and dropped the channel. This is the same gap as Selector.open in #2337: open() does not go through a modeled constructor, and Pipe itself is not Closeable. Thanks, |
This branch has not been deployed
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.
Pipe.open returns a pipe whose source and sink channels each own a native file descriptor until close. Pipe itself is not Closeable, so Pulse never allocated those channels and not closing them was missed. source and sink return the channels allocated by open. read and write may throw IOException without closing the channel.
make -C infer/tests/codetoanalyze/java/pulse test
Please see CONTRIBUTING.md for how to set up your development environment and run tests.