hyperlight-dev / hyperlight-dev/hyperlight
Remove possibility of silent errors in `vmem::TableOps`
Offen
#1,128
0 Kommentare
0 Reaktionen
1 zugewiesene Person
Beansprucht von @syntactically
Auf GitHub ansehen
lifecycle/confirmed
- Vorherrschende Sprache
- Rust
- Sterne
- 4.7k
- Forks
- 208
- Ø Merge
- 1 T. 7 Std.
- Gemergte PRs (30 T.)
- 47
Beschreibung
#1093 introduced
```rust
struct GuestPageTableBuffer {
buffer: std::cell::RefCell>,
}.
```
To avoid UB in the `into_bytes` implementation, this buffer made `Vec` instead of `Vec`. However this forced `read_entry` to possibly error silently using `unwrap_or(0)`.
We should remove the possibility of error occurring silently, either by panicking, or by rewriting `into_bytes` to avoid UB using `Vec`
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.