Misaligned pointer dereference of VMMemoryImport #4059
Labels
🕵️ needs investigation
The issue/PR needs further investigation
priority-medium
Medium priority issue
Milestone
Describe the bug
Got
thread 'main' panicked at 'misaligned pointer dereference: address must be a multiple of 0x8 but is 0x55bf03f10cc4', lib/vm/src/instance/mod.rs:167:18
when run example compiled with nightly rust (source attached below) on amd64 linux.wasmer-4.0.0
Steps to reproduce
instance
examplecargo +nightly run --example imported-memory --features "cranelift" --profile dev
Expected behavior
Actual behavior
Additional context
Maybe relates to #3245
I investigated it a bit and it looks like this is due to the fact that indexes of signatures set to 4 - https://github.com/wasmerio/wasmer/blob/v4.0.0/lib/types/src/vmoffsets.rs#L531. This leads to misaligned pointer on amd64 when there are odd number of function signatures.
The text was updated successfully, but these errors were encountered: