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
Reading a deleted namespace scalar recreates its stash entry #1980
Deleting a package namespace from its parent stash does not keep that namespace deleted after a qualified scalar is read. This makes Text::Template 1.61's _scrubpkg cleanup assertion fail in t/basic.t on both PerlOnJava backends. System Perl passes the assertion, and the complete upstream suite passes there (22 files, 184 tests). The failure is included in archived CPAN run 20261104-151051-20617.
Root cause
RuntimeStash.deleteNamespace removes the namespace's current slots and marks the package freed. But stash enumeration in HashSpecialVariable reconstructs child-package entries from any qualified global slot it finds. A later read such as $Cleanup::GEN0::test creates an undefined scalar slot; enumeration then infers GEN0:: as a live child stash from that slot and exposes it again. The enumeration path does not honor the freed-stash marker, so this implicit scalar autovivification makes exists $Cleanup::{"GEN0::"} true again. The standalone script in the comment reproduces the behavior without a CPAN dependency.
Expected behavior
Reading an undefined scalar below a namespace deleted from its parent stash must not recreate that child namespace entry. Perl leaves the child absent in the same sequence.
State: active
Agent/session: Codex root-runtime-semantics-20261111
Scope: #1980 deleted namespace scalar lookup recreating a stash child.
Work: fix/runtime-semantics-2007-2017-2006-1980, based on 308a379fc; added a freed-namespace visibility filter to HashSpecialVariable direct stash lookup and enumeration, using the existing package marker.
Checkpoint: 2026-11-11 UTC. The 2-assertion deleted_namespace_scalar_read.t passes on system Perl and both PerlOnJava backends. Full nice -n 19 timeout 3600 make passes. The edit is in lookup/enumeration helpers; inspection of PR #1938 head 6e6606203887746bb42719d75b4a757cfbf39c2e found its HashSpecialVariable delta is an unrelated comment in the deletion path. Link and runtime evidence: /tmp/deleted_namespace_scalar_read_perl_2.log, /tmp/runtime_semantics_final_jvm.log, /tmp/runtime_semantics_final_interpreter.log, /tmp/runtime_semantics_make_4.log.
Blockers: none identified; review overlap on PR #1938 before merge.
Next: include in the combined pull request after final tree review.
Resolved in merged PR #2028. Deleted child namespaces remain absent from stash lookup and enumeration after an undefined scalar read. The focused regression passes on system Perl and both PerlOnJava backends. Closing this report.
Activity
fglock commentedon Nov 5, 2026
Minimal regression script:
Expected: exits successfully. System Perl does; PerlOnJava currently dies with
deleted namespace reappearedon both backends.fglock commentedon Nov 11, 2026
State: active
Agent/session: Codex root-runtime-semantics-20261111
Scope: #1980 deleted namespace scalar lookup recreating a stash child.
Work:
fix/runtime-semantics-2007-2017-2006-1980, based on308a379fc; added a freed-namespace visibility filter toHashSpecialVariabledirect stash lookup and enumeration, using the existing package marker.Checkpoint: 2026-11-11 UTC. The 2-assertion
deleted_namespace_scalar_read.tpasses on system Perl and both PerlOnJava backends. Fullnice -n 19 timeout 3600 makepasses. The edit is in lookup/enumeration helpers; inspection of PR #1938 head6e6606203887746bb42719d75b4a757cfbf39c2efound itsHashSpecialVariabledelta is an unrelated comment in the deletion path. Link and runtime evidence:/tmp/deleted_namespace_scalar_read_perl_2.log,/tmp/runtime_semantics_final_jvm.log,/tmp/runtime_semantics_final_interpreter.log,/tmp/runtime_semantics_make_4.log.Blockers: none identified; review overlap on PR #1938 before merge.
Next: include in the combined pull request after final tree review.
fglock commentedon Nov 12, 2026
Resolved in merged PR #2028. Deleted child namespaces remain absent from stash lookup and enumeration after an undefined scalar read. The focused regression passes on system Perl and both PerlOnJava backends. Closing this report.