Skip to content

[java] Model FileChannel.open and Files.newByteChannel for Pulse - #2311

Merged
dulmarod merged 1 commit into
meta:mainfrom
tanvir-ux:fix/file-channel-resource-leak
Nov 20, 2026
Merged

dulmarod merged 1 commit into
meta:mainfrom
tanvir-ux:fix/file-channel-resource-leak

Conversation

@tanvir-ux

Copy link
Copy Markdown
Contributor

Files.newByteChannel and FileChannel.open return a fresh channel that must be closed. Pulse never allocated that channel, so not closing it was missed. read, write, position and truncate were also unknown, so any of them dropped 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.

Files.newByteChannel and FileChannel.open return a fresh channel that
must be closed. Pulse never allocated that channel, so not closing it
was missed. read, write, position and truncate were also unknown, so
any of them dropped the channel.

make -C infer/tests/codetoanalyze/java/pulse test
@meta-cla meta-cla Bot added the CLA Signed label Nov 19, 2026
@dulmarod
dulmarod merged commit 66193a3 into meta:main Nov 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants