mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-30 09:01:33 +00:00
Fixed asseertion of alignment
This commit is contained in:
@ -48,8 +48,7 @@ pub fn getpwuid(ctx: &mut Ctx, uid: i32) -> i32 {
|
|||||||
let passwd_struct_ptr =
|
let passwd_struct_ptr =
|
||||||
emscripten_memory_pointer!(ctx.memory(0), passwd_struct_offset) as *mut GuestPasswd;
|
emscripten_memory_pointer!(ctx.memory(0), passwd_struct_offset) as *mut GuestPasswd;
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
passwd_struct_ptr as usize
|
passwd_struct_ptr as usize % std::mem::align_of::<GuestPasswd>(),
|
||||||
% std::cmp::min(std::mem::size_of::<usize>(), std::mem::align_of::<usize>()),
|
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
(*passwd_struct_ptr).pw_name = copy_cstr_into_wasm(ctx, passwd.pw_name);
|
(*passwd_struct_ptr).pw_name = copy_cstr_into_wasm(ctx, passwd.pw_name);
|
||||||
|
Reference in New Issue
Block a user