Skip to content
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

Return a fresh handle from tiledb_field_channel. #4637

Closed
wants to merge 3 commits into from

Conversation

teo-tsirpanis
Copy link
Member

@teo-tsirpanis teo-tsirpanis commented Jan 16, 2024

SC-39123

tiledb_field_channel was always returning the same channel for a field and freed it when the field itself was freed, resulting in double freeing if the user also freed that handle, as the expectation for managing handles is. This PR changes the function to always create a different handle.

Validated by successfully running unit_capi_query_field on Windows in Debug mode (it was failing previously with a segfault because of the aforementioned double freeing).

By searching for the regex tiledb_\w+_t\* in all .cpp and .h files and inspecting the results, I did not notice any similar case elsewhere in the codebase.


TYPE: BUG
DESC: Return a fresh handle from tiledb_field_channel, preventing double freeing.

Fixes double freeing if the user also frees the handle, as they are expected to do.
Copy link

Copy link
Contributor

@eric-hughes-tiledb eric-hughes-tiledb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cause of the failure in CI was not diagnosed correctly. This approach to fixing the symptoms does not get at the underlying problem.

This isn't the approach we want.

@teo-tsirpanis
Copy link
Member Author

Opened SC-40347 for the CI failure. Because the failure is clearly not related to this PR I don't think investigating the failure should block this.

@KiterLuc
Copy link
Contributor

KiterLuc commented Mar 6, 2024

Closing in favor of #4786

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.

3 participants