-
Notifications
You must be signed in to change notification settings - Fork 4k
CQ shared: Fix off-by-nine error leading to lost messages #14576
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
base: main
Are you sure you want to change the base?
Conversation
5ea57d8
to
9246583
Compare
cc @gomoripeti |
CQ test for file scanning is now failing. I'll look on Monday. |
9246583
to
8294c3f
Compare
I've changed it to +8, but will need to double check if that's right. |
For greater clarity I will change it to |
8294c3f
to
52363c2
Compare
I am adding a test case that demonstrates the bug and the fix and can indeed confirm that it happens because of this off-by-nine (ie current code works if we are outside of this range). |
52363c2
to
1a7e92a
Compare
And `eof` crashes. The problem is that we may end up trying to read more data from the file when scanning, despite being at the end of the file. This results in the current Acc to be returned instead of the remaining data being parsed. This results in some messages at the end of the file being truncated off despite still being in memory (and still pointing to the end of the original file, well past the truncation point).
1a7e92a
to
f363854
Compare
@lukebakken Did you change something in the commit? |
And
eof
crashes.The problem is that we may end up trying to read more data from the file when scanning, despite being at the end of the file. This results in the current Acc to be returned instead of the remaining data being parsed.
This results in some messages at the end of the file being truncated off despite still being in memory (and still pointing to the end of the original file, well past the truncation point).
Tentative fix for #14181 (reply in thread)
Someone please double check that there's no off-by-one error.