Skip to content

fix: clear file EOF and preserve wide unpack checksums - #1924

Merged
fglock merged 1 commit into
masterfrom
fix/io-clearerr-eof-after-growth
Oct 29, 2026
Merged

fglock merged 1 commit into
masterfrom
fix/io-clearerr-eof-after-growth

Conversation

@fglock

@fglock fglock commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Reset buffered and physical EOF state across file-handle wrappers when IO::Handle::clearerr is called, so reads can resume after the file grows.
  • Preserve exact masked integer results for wide unpack checksums. Avoid lossy double-precision checks and an incorrect 63-bit Q adjustment.
  • Add permanent coverage for reading after EOF and for 54-bit/63-bit c and 63-bit Q checksums.

Fixes #1922.

Validation

  • nice -n 19 make — passed.
  • nice -n 19 make check-links — passed.
  • timeout 120 ./jperl src/test/resources/unit/pack_core_regressions.t — passed.
  • timeout 120 ./jperl --interpreter src/test/resources/unit/pack_core_regressions.t — passed.
  • timeout 600 perl dev/tools/perl_test_runner.pl perl5_t/t/op/pack.t — 14,726/14,726 passed.
  • System Perl focused checksum reproducers passed.
  • The Log::Procmail 0.14 suite passed all 281 tests during the original clearerr investigation.

@fglock
fglock force-pushed the fix/io-clearerr-eof-after-growth branch from ebd24bd to 068dd3a Compare October 29, 2026 15:33
@fglock fglock changed the title fix: clear file EOF state after source growth fix: clear file EOF and preserve wide unpack checksums Oct 29, 2026
Reset EOF state after file growth and retain exact integer results for wide unpack checksums.

Fixes #1922.

Generated with [Codex](https://openai.com/codex/)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock force-pushed the fix/io-clearerr-eof-after-growth branch from 068dd3a to 6fe6664 Compare October 29, 2026 16:46
@fglock
fglock marked this pull request as ready for review October 29, 2026 16:47
@fglock
fglock merged commit 5da3dcf into master Oct 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IO::Handle::clearerr leaves EOF state latched after file growth

2 participants