Closed llooFlashooll closed 6 months ago
You only mention alignment issues, but there is in fact an explicit check in the code you refer to for alignment. If you believe there is something incorrect about this check, please say what you think the issue is, specifically.
When using static analysis tools that may have false positives, generally you need to look at the code being flagged to ensure that it is not a false positive, as in this case.
Ok, I understand. Thanks for your reply!
Hi, I am scanning the bytemuck in the latest version with my own static analyzer tool.
Unsafe conversion found at: src/internal.rs:331:23: 331:46
This unsound implementation would create a misalignment issues if the generics type
A
andB
are not properly handled like it's other random types.This would potentially cause undefined behaviors in Rust. If we further manipulate the problematic converted types, it would potentially lead to different consequences. I am reporting this issue for your attention.