mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +00:00
Fix argument passing at entry.
This commit is contained in:
parent
80812e3809
commit
78fd995ad3
@ -159,10 +159,10 @@ impl ProtectedCaller for X64ExecutionContext {
|
||||
}
|
||||
|
||||
let f = &self.functions[index];
|
||||
let mut total_size: usize = 0;
|
||||
let total_size = f.num_params * 8;
|
||||
|
||||
for local in &f.locals[0..f.num_params] {
|
||||
total_size += get_size_of_type(&local.ty).unwrap();
|
||||
if f.num_params > 0 && f.locals[f.num_params - 1].stack_offset != total_size {
|
||||
panic!("internal error: inconsistent stack layout");
|
||||
}
|
||||
|
||||
let mut param_buf: Vec<u8> = vec![0; total_size];
|
||||
|
Loading…
x
Reference in New Issue
Block a user