Nested $^X launch fails after EnvDir -clean clears Java launcher environment
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- operating-systems
Direzione di ricerca
Start with t/10_envdir_pl.t and bin/envdir.pl, then trace how the nested $^X launcher selects Java when EnvDir -clean changes PATH. Add a regression case for nested $^X after environment cleanup, preserving the requested child environment while ensuring the launcher can find Java; the test should pass on PerlOnJava and standard Perl.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The EnvDir distribution fails t/10_envdir_pl.t on PerlOnJava when envdir.pl runs a child $^X after loading EnvDir -clean.
Evidence
- Distribution:
EnvDir-0.08 - Failing test:
t/10_envdir_pl.t - CPAN run:
20260921-102914-97159 - Source: CPAN random tester run
20260921-102914-97159 - PerlOnJava result: 25/26 tests passed; 1/7 test programs failed
- Standard Perl oracle: all 26 tests passed
The failing test expects:
FOO=foo
PATH=/env/bin
but the child produces no output and reports:
ERROR: PerlOnJava requires Java 24 or later; java was not found in PATH.
Reproduction
bin/envdir.pl uses:
use EnvDir 'envdir', -clean;
EnvDir -clean clears %ENV and sets PATH=/bin:/usr/bin; the test environment then overrides PATH with /env/bin. This removes the inherited PERLONJAVA_JAVA_BIN value. The child $^X is PerlOnJava's launcher shim, which then cannot locate Java and exits before running the requested child code.
The parent launcher works when PERLONJAVA_JAVA_BIN=/usr/bin/java is explicitly preserved, confirming that the failure is in launching a nested PerlOnJava process from a cleaned/restricted environment rather than in EnvDir's normal variable update behavior.
Expected behavior
A PerlOnJava program should be able to invoke $^X after deliberately modifying or cleaning %ENV, as standard Perl does. The nested launcher should retain or otherwise reliably locate the Java executable without requiring java to remain on the child process's modified PATH.
Suggested direction
Make the nested $^X launcher self-contained with respect to Java selection, or arrange for the selected Java path to survive launcher recursion without violating EnvDir -clean's requested child environment semantics. Add a regression test covering a nested $^X invocation after environment cleanup.
- Lingua principale
- Perl
- Stelle
- 64
- Fork
- 7
- Merge medio
- 4h 34m
- PR unite (30g)
- 181
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fglock/PerlOnJava
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fglock/PerlOnJava#1579 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port area:unicode bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
fglock/PerlOnJava#1341 ·
I maintainer di solito rispondono entro 1 giorno
-
area:io area:runtime bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
fglock/PerlOnJava#1630 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port area:unicode bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
fglock/PerlOnJava#1629 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
fglock/PerlOnJava#1626 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di fglock/PerlOnJava
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
linux-test-project/lcov#552 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
szTheory/exifcleaner#383 ·
I maintainer di solito rispondono entro 1 giorno
-
1.severity: security
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
NixOS/nixpkgs#569828 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ESCOMP/CAM#1701 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Multiple IPs in hostnameApertabug OS Images
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
stfc/cloud-image-builders#233 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno