9bb1222933
error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused
--> virtio-core/src/probe.rs:126:21
|
86 | let capability = unsafe { &*(capability.data.as_ptr() as *const PciCapability) };
| --------------------------------------------------- backing allocation comes from here
...
126 | (&*(capability as *const PciCapability as *const PciCapabilityNotify))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: casting from `transport_pci::PciCapability` (13 bytes) to `transport_pci::PciCapabilityNotify` (17 bytes)
= note: `#[deny(invalid_reference_casting)]` on by default