Initialize FxsaveArea with zero

This commit is contained in:
Zhang Junyang 2023-08-04 11:33:07 +08:00 committed by Tate, Hongliang Tian
parent b54843172b
commit eb8eb440b3
1 changed files with 1 additions and 5 deletions

View File

@ -336,11 +336,7 @@ impl FpRegs {
pub fn new() -> Self {
// The buffer address requires 16bytes alignment.
Self {
buf: unsafe {
// FIXME: This is an UB. The initialization could be done in a controlled manner.
#[allow(clippy::uninit_assumed_init)]
MaybeUninit::uninit().assume_init()
},
buf: FxsaveArea { data: [0; 512] },
is_valid: false,
}
}