Reading a deleted namespace scalar recreates its stash entry
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with RuntimeStash.deleteNamespace and the stash enumeration path in HashSpecialVariable, then inspect t/basic.t and the standalone reproduction described in the issue. Trace how a qualified undefined scalar is handled after its namespace is deleted. Done means the child namespace remains absent after the scalar read, matching Perl's behavior on both PerlOnJava backends.
由索引模型根据 Issue 内容生成。
描述
Summary
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.
- 主要语言
- Perl
- 星标
- 65
- 派生
- 8
- 平均合并
- 5 小时 45 分钟
- 30 天内合并 PR
- 184
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
area:runtime documentation enhancement
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#1579 ·
维护者通常 1 天内回复
-
area:backend bug
难度 4/5 3-5 天 新手友好度 55/100
fglock/PerlOnJava#1981 · 1 条评论 ·
维护者通常 1 天内回复
-
area:parser bug
难度 4/5 3-5 天 新手友好度 48/100
fglock/PerlOnJava#1979 · 1 条评论 ·
维护者通常 1 天内回复
-
area:cpan-port bug
难度 5/5 一周以上 新手友好度 35/100
fglock/PerlOnJava#1962 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
fglock/PerlOnJava#1961 · 1 条评论 ·
维护者通常 1 天内回复
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
wave-followup
难度 2/5 1-3 小时 新手友好度 74/100
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复