Skip to content

Ensure the DLHandle passed to SourceKitD.init(dlhandle:path:pluginPaths:initialize:) gets closed if the initializer fails #2096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 27, 2025

Just something I noticed while looking through code. I am not aware of any issues caused by this.

Also relax the precondition in DLHandle.deinit to a fault. If we do not close a DLHandle, that’s a bug but it’s not so bad that we should crash sourcekit-lsp for it.

…Paths:initialize:)` gets closed if the initializer fails

Just something I noticed while looking through code. I am not aware of any issues caused by this.

Also relax the `precondition` in `DLHandle.deinit` to a fault. If we do not close a `DLHandle`, that’s a bug but it’s not so bad that we should crash sourcekit-lsp for it.
@ahoppen ahoppen marked this pull request as ready for review March 28, 2025 21:29
@ahoppen
Copy link
Member Author

ahoppen commented Mar 28, 2025

@swift-ci Please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant