TileDB
TileDB copied to clipboard
Return a fresh handle from `tiledb_field_channel`.
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.
This pull request has been linked to Shortcut Story #39123: tiledb_field_channel returns the same handle and is prone to double freeing..
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.
Closing in favor of #4786