TileDB icon indicating copy to clipboard operation
TileDB copied to clipboard

Return a fresh handle from `tiledb_field_channel`.

Open teo-tsirpanis opened this issue 1 year ago • 2 comments

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.

teo-tsirpanis avatar Jan 16 '24 17:01 teo-tsirpanis

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.

teo-tsirpanis avatar Jan 30 '24 22:01 teo-tsirpanis

Closing in favor of #4786

KiterLuc avatar Mar 06 '24 12:03 KiterLuc