Reading a deleted namespace scalar recreates its stash entry
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 57/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Perl
- Sterne
- 65
- Forks
- 8
- Ø Merge
- 5 Std. 45 Min.
- Gemergte PRs (30 T.)
- 184
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus fglock/PerlOnJava
-
area:runtime documentation enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
fglock/PerlOnJava#1579 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:backend bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
fglock/PerlOnJava#1981 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:parser bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
fglock/PerlOnJava#1979 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:cpan-port bug
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
fglock/PerlOnJava#1962 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
fglock/PerlOnJava#1961 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in fglock/PerlOnJava
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 2 Tagen
-
wave-followup
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
-
benchmarks/README: 'perl BNG2.pl model.bngl' runs the whole protocol, not just generate_networkOffendocumentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag