Hi, I am scanning the fluvio-wasm-timer in the latest version with my own static analyzer tool.
Unsafe conversion found at: /src/timer.rs#L530
fn into_usize(self) -> usize {
unsafe { mem::transmute::<Weak<Inner>, usize>(self.inner) }
}
This unsound implementation would create a misalignment issues if the type size of <Weak<Inner> is smaller than the type size of usize.
This would potentially cause undefined behaviors in Rust. If we further manipulate the problematic converted types, it would potentially lead to different consequences such as access out-of-bound. I am reporting this issue for your attention.