Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #32 +/- ##
=======================================
Coverage 86.81% 86.81%
=======================================
Files 14 14
Lines 5869 5872 +3
Branches 887 888 +1
=======================================
+ Hits 5095 5098 +3
Misses 774 774
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root Cause: ext.substr(1, ext.size() - 1) bug in trx-cpp at trx.tpp:362
The crash is caused by a bug in trx-cpp's _create_trx_from_pointer function at trx.tpp:362:
trx->streamlines->mmap_pos = trx::_create_memmap(filename, shape, "r+", ext.substr(1, ext.size() - 1), mem_adress);_split_ext_with_dimensionality returns ext = "float32" (no leading dot). The ext.substr(1, 6) produces "loat32", which is passed to _create_memmap as the dtype.
In _create_memmap (trx.cpp:751-753), the filesize is calculated as:
filesize = rows * cols * _sizeof_dtype(dtype)
_sizeof_dtype("loat32") matches no known dtype and falls through to the default return of sizeof(uint16_t) = 2 (dtype_helpers.cpp:30). For float32 data it should
return 4.
This means the positions mmap is created at half the required size:
The Eigen::Map is then created with shape (5000, 3) over this undersized buffer. When build_streamline_aabbs() iterates all vertices, it reads beyond the mapped memory.
Why Windows crashes but Linux doesn't: