Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Sep 24, 2025

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.


This is an automatic backport of pull request #14576 done by Mergify.

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).

(cherry picked from commit f363854)
@lhoguin lhoguin added this to the 4.2.0 milestone Sep 24, 2025
@lhoguin lhoguin merged commit d46a369 into v4.2.x Sep 24, 2025
567 of 569 checks passed
@lhoguin lhoguin deleted the mergify/bp/v4.2.x/pr-14576 branch September 24, 2025 11:28
lhoguin added a commit that referenced this pull request Sep 24, 2025
CQ shared: Fix off-by-nine error leading to lost messages (backport #14576) (backport #14599)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants