You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix dangling memory tracker references in the buffer and buffer list C API handles et. al. (#5305)
[SC-55087](https://app.shortcut.com/tiledb-inc/story/55087/do-not-show-message-dialog-on-debug-assertion-failures-in-tiledb-unit-on-windows-ci)
Fixes#5295
Several tests allocate a `tiledb_buffer_t*` but never free it. When the
context that created the buffer gets freed, the buffer's memory tracker
gets freed, which causes a debug assertion to fail because that tracker
had some outstanding memory allocated.
This PR fixes it by adding a `shared_ptr<MemoryTracker>` field in
`tiledb_buffer(_list)_handle_t`, ensuring the memory tracker does not
outlive the C API handles.
While the assertion failures could be avoided by patching the buffer
handle leaks, freeing a buffer handle (or any kind of handle) after its
context should not fail unless in extreme cases. Memory leaks in test
code will be addressed in a subsequent PR (opened SC-55086 to track this
work).
I also updated `tiledb_unit` to not display a message box on assertion
failures when running on Windows CI, which caused timeouts similar to
#4250. We should eventually do this to all Catch2 tests.
---
TYPE: NO_HISTORY
0 commit comments