Environ drops the final variable when the trailing NUL is absent
I maintainer di solito rispondono entro 4 giorni
Una pull request collegata è già stata integrata.
- #884 di @gerardrecinto — integrata
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go, linux
- Ambito
- operating-systems
Direzione di ricerca
Start in Proc.Environ, where the data split on NUL unconditionally drops the last element. The reporter describes a table-driven regression that uses NewFS, FS.Proc and a temporary proc fixture. Done means unterminated inputs (A=1, A=1\0B=2, B=) keep every variable, while terminated inputs and embedded empty entries behave as before. The reporter says they are already working on a fix, so check with them before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Proc.Environ() unconditionally removes the last element after splitting on NUL. When /proc/<pid>/environ has no trailing NUL, this drops the final variable: A=1 becomes an empty slice, and A=1\0B=2 becomes ["A=1"].
The Linux manual explicitly allows the trailing NUL to be absent: https://man7.org/linux/man-pages/man5/proc_pid_environ.5.html.
Reproduced on current master 13dc9c2 through the public NewFS, FS.Proc and Proc.Environ APIs with a temporary proc fixture. A table-driven regression fails for a single unterminated entry, multiple unterminated entries, and an unterminated empty value (B=). Terminated inputs and embedded empty entries pass unchanged.
I am working on a focused fix that removes the final split element only when it is empty. This preserves the empty entries discussed in #680 and does not filter environment contents or change read-error behavior.
Thanks
Gerard Recinto
- Lingua principale
- Go
- Stelle
- 883
- Fork
- 395
- Merge medio
- 6g 17h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né 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 prometheus/procfs
-
stat.go: /proc/stat processes field overflow causes parseStat() to fail entirelyForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
prometheus/procfs#831 · 3 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
Export InfiniBandDevice parsing or add device filtering to InfiniBandClassForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
prometheus/procfs#823 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
prometheus/procfs#799 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
prometheus/procfs#787 ·
I maintainer di solito rispondono entro 4 giorni
-
sysfs.Mdraids() fails if any MD raid array has a delayed check or resyncForse già presa @mehrdadbn9 l’ha presa 238 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
prometheus/procfs#770 · 1 reazione ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di prometheus/procfs
Issue simili
-
Go device SDK: Whisper transcriber keeps buffering and transcribing audio appended after Stop()Forse già presa @apoorvdarshan l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
BasedHardware/omi#22770 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug v3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug needs-acceptance wg/router-models-inference-runtime
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
vllm-project/semantic-router#5295 ·
I maintainer di solito rispondono entro 1 giorno
-
plan lint: overclaim fires on every page linted without enrichment (regex matches inlined chrome.js)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
openilink/openilink-hub#271 ·