Skip to content

[java] Model Selector.open for Pulse resource leaks - #2337

Merged
dulmarod merged 1 commit into
meta:mainfrom
tanvir-ux:fix/selector-resource-leak
Nov 30, 2026
Merged

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

Conversation

@tanvir-ux

Copy link
Copy Markdown
Contributor

Selector.open returns a fresh selector that owns a native poll handle until close. Pulse never allocated that selector, so not closing it was missed. select and selectNow may throw IOException without closing it, and wakeup, keys, selectedKeys, isOpen and provider were unknown, so any of them dropped the selector.

make -C infer/tests/codetoanalyze/java/pulse test

Please see CONTRIBUTING.md for how to set up your development environment and run tests.

Selector.open returns a fresh selector that owns a native poll handle
until close. Pulse never allocated that selector, so not closing it
was missed. select and selectNow may throw IOException without closing
it, and wakeup, keys, selectedKeys, isOpen and provider were unknown,
so any of them dropped the selector.

make -C infer/tests/codetoanalyze/java/pulse test
@meta-cla meta-cla Bot added the CLA Signed label Nov 27, 2026
@dulmarod
dulmarod merged commit 7a79eb5 into meta:main Nov 30, 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