-
Notifications
You must be signed in to change notification settings - Fork 26
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
[c++] Fix heap management in fastercsx
#3365
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3365 +/- ##
==========================================
+ Coverage 85.64% 85.74% +0.09%
==========================================
Files 57 57
Lines 6201 6201
==========================================
+ Hits 5311 5317 +6
+ Misses 890 884 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I ran the following (both my core and my tiledbsoma checkouts having had fresh pulls on
with the following output: https://gist.github.com/johnkerl/ebb915ce74e424bc57a4002983792209 Looks to me like:
Looks good to me -- CC @nguyenv if you would like to take a peek as a second pair of eyes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks John.
fastercsx
fastercsx
Issue and/or context: Found while debugging (details below).
Issue: #3345; see also #3304.
Changes:
We have a pair of macros
tdb_new_array
andtdb_delete_array
. As written, these are pairingmalloc
withdelete []
. This is incorrect behavior, which this PR fixes.Also note that this defect is new to our modified vendoring of
threadpool/status.h
:TileDB-SOMA/libtiledbsoma/src/external/include/thread_pool/status.h
Lines 60 to 64 in ca00d5b
Given the narrative at #3304 (comment) I did not review these files on my review of #3304; I'll take another look now including a diff against the core vendoring-source files.
Also note that
libtiledbsoma/src/external/include/thread_pool/status.h
is not new to #3304, but newly exercised by #3304.Notes for Reviewer:
I found this while debugging an issue: on my laptop (but not in CI) there is a segfault here:
TileDB-SOMA/apis/python/tests/test_fastercsx.py
Lines 352 to 363 in ca00d5b
This intends to catch an exception thrown through this callchain, as revealed by source-level debugging this morning:
TileDB-SOMA/apis/python/src/tiledbsoma/_fastercsx.py
Lines 86 to 88 in ca00d5b
TileDB-SOMA/libtiledbsoma/src/utils/fastercsx.h
Lines 310 to 320 in ca00d5b
TileDB-SOMA/libtiledbsoma/src/utils/fastercsx.h
Lines 389 to 398 in ca00d5b
TileDB-SOMA/libtiledbsoma/src/utils/fastercsx.h
Line 286 in ca00d5b
Here is a standalone repro which crashes for me, taken from
apis/python/tests/test_fastercsx.py::test_bad_shapes
:This does crash for me on my laptop; I does not crash for me on an Ubuntu system, and our multi-platform CI is green on
main
. Nonetheless I ranvalgrind
on an Ubuntu system, to investigate. I found the following:The
valgrind
outputled me directly to the codemod addressed on this PR.
Do note however that even after a clean and rebuild I do still experience the segfault with the above scenario on my laptop. This means that I've found a heap-corruption issue on this PR, but there appears to be something else going on as well.