You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IO::Handle::clearerr leaves EOF state latched after file growth #1922
IO::Handle::clearerr clears $! but does not clear the EOF/read-ahead state held by a file channel. If a file grows after a read reaches EOF, a subsequent read after clearerr still returns undef in PerlOnJava.
This caused the Log::Procmail 0.14 CPAN regression in run 20261029-112411: t/20abstract.t dies at line 121 after reading a line appended to a log file. The archived system Perl 5.42.2 run passed all 281 tests. PerlOnJava failed the same assertion on both JVM and interpreter backends. The last recorded passing CPAN run was 2026-10-07 at 66b868f89.
Standard Perl prints second. PerlOnJava prints undef on both backends.
Expected behavior
After clearerr, a read from a file that has grown since EOF should be able to consume the newly appended data. clearerr should clear the relevant underlying EOF/read-ahead state as well as $!.
Environment and evidence
Archived CPAN run: 20261029-112411, distribution Log-Procmail-0.14
Failing test: t/20abstract.t, line 121; 1/9 test programs failed, 0/261 reported subtests failed
System Perl oracle: Perl 5.42.2, all 9 programs and 281 tests passed
PerlOnJava: both JVM and interpreter fail at the same test
Reproduced on macOS 26.7.1 with OpenJDK 24.0.2; current checkout source commit a5bb374b6
Root cause evidence: IO::Handle::_clearerr only clears $!; CustomFileChannel retains physicalEof/isEOF and buffered read state
State: released
Agent/session: Codex root / 2026-10-29 issue-1922
Scope: #1922, fix IO::Handle::clearerr EOF state after file growth. Per the user's follow-up, PR #1924 also includes a separate exact-integer unpack checksum fix discovered in op/pack.t.
Work: fix/io-clearerr-eof-after-growth, published source 068dd3a49a02a4bf725115893ea78cfc15979011, draft PR #1924
Checkpoint: 2026-10-29 UTC; the clearerr path resets EOF/read-ahead state through file-handle wrappers. The same PR preserves exact wide integer checksum sums and removes the incorrect 63-bit Q adjustment. PR #1924 is open, based on master b6546aba3c82e53642ca01b25ffdf2658cb32bb5, and GitHub reports it mergeable.
Evidence: CPAN run 20261029-112411; Log-Procmail 0.14 passes all 281 tests with PerlOnJava. nice -n 19 make passes on the final candidate. The focused pack regression passes on JVM and interpreter; perl5_t/t/op/pack.t passes 14,726/14,726 assertions. System Perl focused reproducers pass for 54-bit/63-bit c and 63-bit Q checksums. make check-links passed for the documentation update.
Blocked by: none
Next: await PR #1924 review and CI.
Activity
fglock commentedon Oct 29, 2026
State: released
Agent/session: Codex root / 2026-10-29 issue-1922
Scope: #1922, fix IO::Handle::clearerr EOF state after file growth. Per the user's follow-up, PR #1924 also includes a separate exact-integer unpack checksum fix discovered in op/pack.t.
Work:
fix/io-clearerr-eof-after-growth, published source068dd3a49a02a4bf725115893ea78cfc15979011, draft PR #1924Checkpoint: 2026-10-29 UTC; the clearerr path resets EOF/read-ahead state through file-handle wrappers. The same PR preserves exact wide integer checksum sums and removes the incorrect 63-bit Q adjustment. PR #1924 is open, based on master
b6546aba3c82e53642ca01b25ffdf2658cb32bb5, and GitHub reports it mergeable.Evidence: CPAN run
20261029-112411; Log-Procmail 0.14 passes all 281 tests with PerlOnJava.nice -n 19 makepasses on the final candidate. The focused pack regression passes on JVM and interpreter;perl5_t/t/op/pack.tpasses 14,726/14,726 assertions. System Perl focused reproducers pass for 54-bit/63-bit c and 63-bit Q checksums.make check-linkspassed for the documentation update.Blocked by: none
Next: await PR #1924 review and CI.
docs: link clearerr issue to draft pull request (#1922)
fix: clear EOF and preserve exact unpack checksums
fix: clear EOF and preserve exact unpack checksums