-
Notifications
You must be signed in to change notification settings - Fork 74
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
Fix check offsets #1511
Fix check offsets #1511
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1511 +/- ##
==========================================
+ Coverage 93.70% 93.74% +0.04%
==========================================
Files 27 27
Lines 22759 22620 -139
Branches 1076 1076
==========================================
- Hits 21326 21205 -121
+ Misses 1399 1381 -18
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I think it's probably worth abstracting out an I guess the call would look something like static int
tsk_individual_table_expand_parents(
tsk_individual_table_t *self, tsk_size_t additional_length)
{
return expand_ragged_column(self->max_parents_length_increment, &self->max_parents_length,
&self->parents);
} |
Yep, will do that. Also reduces test duplication which was getting boring! |
What's the status of this @benjeffery? I think it's worth adding the |
It's waiting for me to get back around to it - finishing up an |
0ef2eb0
to
bbdbac9
Compare
Ok, after some head-scratching this is done. A few queries:
|
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, just need to double-check we're getting all the ragged columns.
Yeah - let's not worry about it though. I guess it'll be become more pressing at some point when we implement the doubling behaviour (#5), when increment will become large quickly. I think it's fine for now, though.
Yeah, let's keep then. More readable this way as you say.
I guess |
bbdbac9
to
faf45dd
Compare
Yes, it is a public method, but undocumented so we could change it. However if #5 is planned then not worth it as it will be obsolete then. |
I think the idea for #5 is to support both the current behaviour, and also doubling. If Probably a single |
@jeromekelleher I think this is ready to go |
This needs some attention @benjeffery - some compiler warnings popping up |
faf45dd
to
73f1a67
Compare
Fixes #1509
Turns out this was wrong in every call to
check_offset_overflow
.Tested by twiddling the internal state of the table struct. We could probably make large columns, but this seemed simpler.