You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using Wasmer and have some code that calls wasmer::Module::deserialize on bytes that I obtain in the following way:
let artifact = wasmer::UniversalArtifact::new(engine, &wasm_source, tunables).unwrap();
let bytes = artifact.serialize().unwrap();
I recently upgraded from Wasmer 1 to 2, and after updating the API calls deserialize started to panic with corrupted binary: misaligned metadata.
Something strange that I noticed is that a well-crafted println!() invocation before and after deserialize makes the problem go away. However, if this works for printing strings X and Y, it does not work when there is even the slightest change to X or Y.
Does anyone have any clues as to why this may happen? Thank you! As a quick note, someone seems to be having a similar problem in this issue, but unfortunately the suggested fix of upgrading to Wasmer 3 is not an option for me.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I am using Wasmer and have some code that calls
wasmer::Module::deserialize
on bytes that I obtain in the following way:I recently upgraded from Wasmer 1 to 2, and after updating the API calls
deserialize
started to panic withcorrupted binary: misaligned metadata
.Something strange that I noticed is that a well-crafted
println!()
invocation before and afterdeserialize
makes the problem go away. However, if this works for printing strings X and Y, it does not work when there is even the slightest change to X or Y.Does anyone have any clues as to why this may happen? Thank you! As a quick note, someone seems to be having a similar problem in this issue, but unfortunately the suggested fix of upgrading to Wasmer 3 is not an option for me.
Beta Was this translation helpful? Give feedback.
All reactions