Commit 3bd0160
fix(D-W6): restore walker gate and document drift-source findings
Empirical D-W6 progress is documented in moose_support.md.
Findings from the no-gate experiment (commit 230a672):
PASS — what removing the gate fixes (Perl 5 semantics replicated):
- t/cdbi/04-lazy.t test 11 (no phantom destroy clobbers row build).
- t/storage/txn_scope_guard.t test 18 (double-DESTROY warning fires).
- t/52leaks.t 11/11 (cycles leak naturally, $r stays defined).
- Refcount unit tests still pass.
FAIL — what removing the gate breaks (refCount drift in MOP code):
- use Class::MOP::Class fails: "Can't locate method initialize" — the
CV for Class::MOP::Class::initialize is destroyed during the circular
bootstrap. PJ_DESTROY_TRACE shows non-blessed RuntimeCode objects
hitting refCount=0 inside MortalList.flush during MiniTrait::apply,
which is a sub-installation path.
- use Moose itself works (different load order) but cmop bootstrap
destroys subs prematurely.
Hybrid attempt (only destroy blessed objects through the gate path)
fixed the bootstrap but regressed t/52leaks.t cascade-cleanup of
non-blessed containers holding blessed children.
Conclusion: the proper D-W6 fix is multi-week — it requires auditing
each cooperative refCount source (sub installation, glob assignment,
@_ promotion, hash-slot stores, closure captures) and back-filling
the missing increments. Until then, restore the universal walker gate
as a safety net (no class-name dispatch; matches PR #599).
Adds a PJ_DESTROY_TRACE=1 env-flag in DestroyDispatch.callDestroy to
help future drift hunting.
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent fa76ea6 commit 3bd0160
3 files changed
Lines changed: 51 additions & 15 deletions
File tree
- src/main/java/org/perlonjava/runtime/runtimetypes
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
111 | 130 | | |
112 | 131 | | |
113 | 132 | | |
| |||
Lines changed: 27 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
558 | 585 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | 586 | | |
571 | 587 | | |
572 | 588 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1195 | 1195 | | |
1196 | 1196 | | |
1197 | 1197 | | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
1198 | 1203 | | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | 1204 | | |
1204 | 1205 | | |
1205 | 1206 | | |
| |||
0 commit comments