Skip to content

test: add issue #1175 sliding-window slot regression - #1227

Merged
fglock merged 2 commits into
masterfrom
fix/issue-1175-sliding-window-refcount
Sep 2, 2026
Merged

test: add issue #1175 sliding-window slot regression#1227
fglock merged 2 commits into
masterfrom
fix/issue-1175-sliding-window-refcount

Conversation

@fglock

@fglock fglock commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a project-owned regression test for issue Clear weakened references when an array slot releases the last owner #1175, modeled on the ownership shape used by Algorithm::SlidingWindow.
  • Covers direct, sparse/preallocated, nested, circular-buffer, CPAN-shaped, and weak-reference/DESTROY paths.
  • The CPAN-shaped assertions deliberately preserve the currently failing behavior as an executable reproducer.

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 clear
  • timeout 120 ./jperl --interpreter src/test/resources/unit/refcount/sliding_window_slot_release.t — expected failure: CPAN-shaped clear
  • timeout 900 ./jcpan -t Algorithm::SlidingWindow — current issue reproduction: 2 of 55 tests fail

This is intentionally a draft WIP: it adds coverage but does not contain the runtime fix.

fglock and others added 2 commits September 2, 2026 20:13
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
fglock force-pushed the fix/issue-1175-sliding-window-refcount branch from dd9f4d3 to ef8fc39 Compare September 2, 2026 18:19
@fglock
fglock marked this pull request as ready for review September 2, 2026 18:19
@fglock
fglock merged commit a2c15a2 into master Sep 2, 2026
2 checks passed
@fglock
fglock deleted the fix/issue-1175-sliding-window-refcount branch September 2, 2026 18:59
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.

1 participant