test: add issue #1175 sliding-window slot regression - #1227
Merged
Conversation
Add project-owned coverage for the weak-reference lifetime bug exposed by Algorithm::SlidingWindow. The test exercises direct, preallocated, nested, circular-buffer, and CPAN-shaped slot replacement and clear paths. The CPAN-shaped assertions intentionally reproduce the remaining unfixed failure on PerlOnJava. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
Replace nested-call synthetic refcount pins with a targeted weak-reference reachability sweep after the enclosing statement. This releases objects whose final array-slot owner was cleared by a method while retaining objects reached from real Perl roots. Fixes #1175. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
fglock
force-pushed
the
fix/issue-1175-sliding-window-refcount
branch
from
September 2, 2026 18:19
dd9f4d3 to
ef8fc39
Compare
fglock
marked this pull request as ready for review
September 2, 2026 18:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Algorithm::SlidingWindow.DESTROYpaths.Validation
timeout 60 prove src/test/resources/unit/refcount/sliding_window_slot_release.t— PASS on system Perl (12 assertions)timeout 120 ./jperl src/test/resources/unit/refcount/sliding_window_slot_release.t— expected failure: CPAN-shaped eviction and cleartimeout 120 ./jperl --interpreter src/test/resources/unit/refcount/sliding_window_slot_release.t— expected failure: CPAN-shaped cleartimeout 900 ./jcpan -t Algorithm::SlidingWindow— current issue reproduction: 2 of 55 tests failThis is intentionally a draft WIP: it adds coverage but does not contain the runtime fix.