Skip to content
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

klippa integration test fails if the Cmap4Iter bumps range start past end of prior range #1166

Closed
rsheeter opened this issue Oct 1, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rsheeter
Copy link
Collaborator

rsheeter commented Oct 1, 2024

As noted on #1101, if Cmap4Iter sets the start of the range to current.end + 1 this somehow results in klippa integration tests failing. E.g.

// Happy
self.cur_range = next_range.start.max(self.cur_range.end)
                    ..next_range.end.max(self.cur_range.end);

// Sad
self.cur_range = next_range.start.max(self.cur_range.end + 1)  // +1: no reason to reprocess the end of the prior range
                    ..next_range.end.max(self.cur_range.end);

Maybe I'm missing something obvious, at a glance this seems like a bug.

@rsheeter rsheeter added the bug Something isn't working label Oct 1, 2024
@dfrg
Copy link
Member

dfrg commented Oct 1, 2024

The cmap4 code uses exclusive ranges so next_range.start.max(self.cur_range.end + 1) will skip an entry if the two ranges are contiguous.

edit: I mean we convert the inclusive range to an exclusive one since it's just easier to work with:

// Use end + 1 here because the range in the table is inclusive

@rsheeter
Copy link
Collaborator Author

rsheeter commented Oct 1, 2024

Oh my bad, confused myself jumping between spec (inclusive) and code (exclusive end). False alarm!

@rsheeter rsheeter closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants