Reading a deleted namespace scalar recreates its stash entry
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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分
- マージ済み PR(30日)
- 184
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 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
-
benchmarks/README: 'perl BNG2.pl model.bngl' runs the whole protocol, not just generate_networkオープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信