Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Windows sandbox helper: exit code 259 after a slow terminate, .git restore, Started ordering, env sort

Aperta
#195 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

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
52/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust, typescript
Ambito
desktop

Direzione di ricerca

Start in native/sandbox-helper/src/win.rs, especially the cited sections around lines 552–588, 708, 842–895, 1337–1383, 1608–1617, and 2025–2063. Read the Windows sandbox process, permissions, and environment handling around each item, then run the relevant sandbox-helper tests on Windows. Done means all five listed behaviors are corrected and covered by tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug platform: windows priority: low severity: low

Found in the 2026-10-07 code review (read).

Problems

  • Exit code 259: after TerminateJobObject, the result of WaitForSingleObject(process, 5000) isn't checked (native/sandbox-helper/src/win.rs:2052-2063). A process that hasn't exited yet is reported with exit code STILL_ACTIVE (259), and reader.join() can block until it lets go of its pipe.
  • .git restore: ProtectedPath::restore always uses UNPROTECTED_DACL_SECURITY_INFORMATION (win.rs:552-588). This is correct only because original_inheritance records only unprotected paths (win.rs:1337-1383). If a snapshot is reused from owners (win.rs:1608-1617) after the user deliberately protected .git between runs, restoring undoes the user's change.
  • Started ordering: Started is sent after the reader threads start and after ResumeThread (win.rs:2025-2036), so output can arrive before it. Nothing breaks today, but the comment describes a strict order.
  • Environment sort: environment_block sorts names with to_uppercase. Windows expects an ordinal, case-insensitive order on UTF-16 code units.
  • Capability case: the capability name uses Unicode to_lowercase (win.rs:708), while the marker comparison uses eq_ignore_ascii_case (win.rs:842-895). Projects with non-ASCII paths therefore propagate their grant again on every run.

Fix

  • Check the wait result, and report timed_out/-1 when the process hasn't exited.
  • Store the original DACL control flags in ProtectedPath and restore with the matching flag.
  • Send Started before ResumeThread.
  • Sort with CompareStringOrdinal(..., TRUE) semantics.
  • Compare markers with the same Unicode lowercasing used to derive the capability.
Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
5h 28m
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PierrunoYT/patch

Tutte le issue di PierrunoYT/patch

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.