test: regression tests for filehandle ref leak (GH #179)#204
test: regression tests for filehandle ref leak (GH #179)#204atoomic merged 4 commits intocpanel:masterfrom
Conversation
e42db60 to
dd65f68
Compare
|
With the recent release of Overload::FileCheck with the fix for cpanel/Overload-FileCheck#25 |
|
@Koan-Bot rebase |
Rebase: test: regression tests for filehandle ref leak (GH #179)Branch Actions
Automated by Kōan |
dd65f68 to
1c952dc
Compare
|
@Koan-Bot rebase |
- Remove .claude/worktrees/ submodule entry from tracking - Add .claude/ to .gitignore - Remove SKIP wrapper from socketpair test — Overload::FileCheck fix (cpanel/Overload-FileCheck#25) is now released Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rebase: test: regression tests for filehandle ref leak (GH #179)Branch Actions
Automated by Kōan |
| } | ||
|
|
||
| # Test 3: The exact scenario from GH #179 — socketpair with dup'd fd | ||
| # This would hang without the fix because the dup'd write handle stays open. |
There was a problem hiding this comment.
We need to bump the minimal version for Overload::FileCheck to be 0.014 to make sure every users got the correct fix.
|
@Koan-Bot rebase |
Tests that file check operators (-S, -f, etc.) on real filehandles do not retain references that prevent garbage collection. Includes the exact socketpair scenario from the bug report where a dup'd write handle kept alive by a leaked ref caused reads to hang. Root cause is in Overload::FileCheck's $_last_call_for variable. Ref: cpanel#179 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove .claude/worktrees/ submodule entry from tracking - Add .claude/ to .gitignore - Remove SKIP wrapper from socketpair test — Overload::FileCheck fix (cpanel/Overload-FileCheck#25) is now released Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5cb38bd to
e70f53a
Compare
Rebase: test: regression tests for filehandle ref leak (GH #179)Branch Actions
Automated by Kōan |
- Remove .claude/worktrees/ submodule entry from tracking - Add .claude/ to .gitignore - Remove SKIP wrapper from socketpair test — Overload::FileCheck fix (cpanel/Overload-FileCheck#25) is now released Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
-S,-f, etc.) on real filehandles don't retain referencesContext
The root cause is in
Overload::FileCheck— the$_last_call_forvariable stored filehandle references, preventing garbage collection. The fix is in cpanel/Overload-FileCheck#25.This PR adds regression tests on the Test::MockFile side to ensure the issue stays fixed.
Tests
$fhis GC'd after-f $fhand-S $fh-Son a dup'd socket handle, then verifies<$r>doesn't hangTest plan
Overload::FileCheckincludes the fix from fix: prevent filehandle reference leak in stat override Overload-FileCheck#25Overload::FileCheckrelease (proving the bug exists)Fixes #179
🤖 Generated with Claude Code