diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-04-15 13:13:19 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-17 09:54:51 +0200 |
| commit | eb64a0c6ae492f8ef37f31c9d4994bfc69f02e3d (patch) | |
| tree | 95e98bb5b3ff639b406615bc18004438b0a5427c /rust/qemu-api/src/memory.rs | |
| parent | abf18324240a3c8f3feafbe5a96d4b83cd044615 (diff) | |
| download | focaccia-qemu-eb64a0c6ae492f8ef37f31c9d4994bfc69f02e3d.tar.gz focaccia-qemu-eb64a0c6ae492f8ef37f31c9d4994bfc69f02e3d.zip | |
rust: hpet: fully initialize object during instance_init
The array of BqlRefCell<HPETTimer> is not initialized yet at the end of instance_init. In particular, the "state" field is NonNull and therefore it is invalid to have it as zero bytes. Note that MaybeUninit is necessary because assigning to self.timers[index] would trigger Drop of the old value. Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/memory.rs')
0 files changed, 0 insertions, 0 deletions