-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
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
Undefined behavior when creating SerializedValue #411
Comments
Alternatively, if you want to avoid initializing with a default value, you could use |
Also happens with 1.48 stable |
Is this the same erorr: Issue #9 of yew-wasm-pack-minimal? |
#412 looks like it'll fix this (as well as doing various other things) |
This was referenced Apr 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Starting in Rust 1.49, the js serialization crashes at runtime when compiled in release mode. Steps to reproduce:
Output:
I bisected the rust compiler and the first bad commit is:
rust-lang/rust@b836329
I guess this is a problem of using
std::mem::uninitialized()
here:stdweb/src/webcore/serialization.rs
Line 415 in 9b418d9
I fixed it by using
Default::default()
instead, and everything works fine:The text was updated successfully, but these errors were encountered: