We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I noticed a case in which speedy invokes undefined behavior:
speedy
use speedy::Writable; fn main() { let chonk = vec![(); 0x7FFFFFFF_FFFFFFFF + 1]; let _ = chonk.write_to_vec(); }
error: Undefined Behavior: entering unreachable code --> /home/finnb/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/speedy-0.8.7/src/writable_impl.rs:245:9 | 245 | unsafe_is_length!( self.len() ); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code
I recommend skipping the assertion if std::mem::size_of::<T>() == 0.
std::mem::size_of::<T>() == 0
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Hello, I noticed a case in which
speedy
invokes undefined behavior:I recommend skipping the assertion if
std::mem::size_of::<T>() == 0
.The text was updated successfully, but these errors were encountered: