Repository navigation
Fix byte offsets of row oriented array components and out-of-record reads in get_channel_raw_bytes - #1319
Merged
danielhrisca merged 1 commit intoOct 1, 2026
Conversation
…eads in get_channel_raw_bytes Fixes danielhrisca#1318
danielhrisca
approved these changes
Oct 1, 2026
Owner
|
thanks @victorjoh |
|
Thanks for merging this. Is there a planned release that will include the fix, e.g. the next release from development? Since there are other fixes there as well, we'd like to know roughly when to expect it. If that's still some way off, a backport to asammdf_8.8.x (8.8.28) would also help us, as we're on 8.8.27 and affected by the wrong byte offsets of row-oriented array components. |
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.
Fixes #1318. Related: #1264, #1316.
ChannelArrayBlock._factors: for row-oriented layout the last dimension now varies fastest, so f(d) = f(d+1)·dim_size(d+1). Column-oriented (FLAG_CA_INVERSE_LAYOUT) results are unchanged.get_channel_raw_bytes/get_channel_raw_bytes_C: clamp the number of bytes read to the part of the channel inside the record, and zero-fill the rest. Before this, a channel starting at or after the end of the record wrote past the output buffer.Tests:
test_mdf4.py::test_row_oriented_array_components: writes a 7 × 6 matrix and checks that all element channels are inside the record and have the right values.test_cutils.py:get_channel_raw_byteswith channels inside, partly outside and fully outside the record. The last case only fails reliably underPYTHONMALLOC=debug.Both new tests fail on
developmentand pass with this change.