-
Notifications
You must be signed in to change notification settings - Fork 131
Fix debug assert in Simple8b and Simple16 when input lenght is unknown (0) #138
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 debug assert in Simple8b and Simple16 when input lenght is unknown (0) #138
Conversation
|
Please sync with our main branch. This should (???) fix the CI errors. |
5b324b6 to
eb74a8d
Compare
|
Thank you, @lemire, the branch is now updated; but (if I’m not wrong), the CI workflow requires approval? |
|
It fails in CI, see: |
|
Ok, got it! I was testing only in debug mode, and the issue was happening only in release mode. Honestly, I don't know why this difference. However, I see the cause of the error is that Suppose a case where The solution wasn't complex. I simply added a headroom of "28" (the maximum number of elements in a single pack) to the output, and it worked. However, my question now is why this doesn’t happen with |
|
Merging. |
Fixes #69 for
Simple8bandSimple16.The issue was occurring only in debug mode (not release mode) because decoding with an unknown input
length(indicated by a value of 0) but passingnvalue(the number of elements to decode) failed on debug assertions not contemplating this case.This patch fixes the assertion logic, and also adds tests for reproduce the case.