bytecodealliance / bytecodealliance/rustix
Add memory sanitizer (msan) support for rand::getrandom_uninit (and io::read)
- Lingua principale
- Rust
- Stelle
- 2.1k
- Fork
- 294
- Merge medio
- 6g 22h
- PR unite (30g)
- 4
Descrizione
In order to use create a rustix backend for the `getrandom` crate that would pass its tests using memory sanitizer, these functions nedd to `__msan_unpoison` their output buffer only when they succeed, when `#[cfg(sanitize = "memory")]` (only available on Nightly):
* `rand::getrandom_uninit`
* ,io::read
`rand::getrandom_uninit` is the most urgent, as people probably won't be running memory sanitizer on a kernel so old that `getrandom` would fall back to reading from `/dev/urandom`.
See https://github.com/rust-random/getrandom/pull/463 for my attempt to do this directly within `getrandom`.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Leggi la pull request collegata di getrandom sul comportamento proposto del memory sanitizer, quindi individua rand::getrandom_uninit e io::read in rustix. Verifica come ciascuno segnala il successo e gestisce il proprio buffer di output; il lavoro è completo quando entrambi chiamano condizionalmente __msan_unpoison solo per operazioni riuscite con la configurazione nightly del sanitizer indicata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- operating-systems
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100