Windows support cleanup: ~1,500 dead lines in structs.rs, bindgen noise in paging.rs

Aperta
#434 0 commenti 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
45/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start by reading src/os/windows/structs.rs, src/os/windows/paging.rs, and the #![allow(unused)] attribute at src/os/mod.rs:1; verify the reported unused items and bindgen output against the current code. Then inspect collect() and SourceCache::new to trace the repeated process lookup and unconditional source hashing. Done means removing confirmed dead code, addressing the paging noise, and gating source hashing as suggested, with relevant checks passing; the report has not been verified or reproduced under SIMICS.

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

Descrizione

Where

  • src/os/windows/structs.rs, src/os/windows/paging.rs, src/os/mod.rs:1 (#![allow(unused)])

Problem

  • paging.rs (2520 lines) is bindgen output of a small header: ~250 lines of glibc constants, unused _MMPTE_HARDWARE and setters.
  • structs.rs has unreferenced items: WindowsTeb, WindowsKThread::teb, several WindowsLdrDataTableEntry/WindowsPebLdrData methods.
  • Dead: KernelInfo::process_list (same list-termination bug), DebugInfo::new_dtb, CvInfoPdb70::new_dtb, CpuInstrumentationCbHandle; duplicated find_ps_*_address, near-copy intervals impls.
  • current_process() runs twice per collect(); SourceCache::new hashes every source file even when symbolic_coverage is off.

Impact
Large surface hiding real bugs; slower snapshots.

Suggested fix
Remove #![allow(unused)] and delete what it surfaces; regenerate or hand-write paging bitfields; gate SourceCache on symbolic_coverage.

Status
Reported by static code review at 79972db; not yet re-verified line by line. Found by reading the code; not reproduced under SIMICS.

Lingua principale
Rust
Stelle
335
Fork
26
Merge medio
1g 50m
PR unite (30g)
12

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 intel/tsffs

Tutte le issue di intel/tsffs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.