mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
[___syscall146] Move loop out of unsafe
zone
This commit is contained in:
parent
d6dd3696f1
commit
53a8fbeb2a
@ -496,8 +496,8 @@ pub fn ___syscall146(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
|
|||||||
|
|
||||||
debug!("=> fd: {}, iov: {}, iovcnt = {}", fd, iov, iovcnt);
|
debug!("=> fd: {}, iov: {}, iovcnt = {}", fd, iov, iovcnt);
|
||||||
let mut ret = 0;
|
let mut ret = 0;
|
||||||
unsafe {
|
for i in 0..iovcnt {
|
||||||
for i in 0..iovcnt {
|
unsafe {
|
||||||
let guest_iov_addr =
|
let guest_iov_addr =
|
||||||
emscripten_memory_pointer!(ctx.memory(0), (iov + i * 8)) as *mut GuestIovec;
|
emscripten_memory_pointer!(ctx.memory(0), (iov + i * 8)) as *mut GuestIovec;
|
||||||
let iov_base = emscripten_memory_pointer!(ctx.memory(0), (*guest_iov_addr).iov_base)
|
let iov_base = emscripten_memory_pointer!(ctx.memory(0), (*guest_iov_addr).iov_base)
|
||||||
@ -510,9 +510,9 @@ pub fn ___syscall146(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
|
|||||||
}
|
}
|
||||||
ret += curr;
|
ret += curr;
|
||||||
}
|
}
|
||||||
// debug!(" => ret: {}", ret);
|
|
||||||
ret as _
|
|
||||||
}
|
}
|
||||||
|
debug!(" => ret: {}", ret);
|
||||||
|
ret as _
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn ___syscall191(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
|
pub fn ___syscall191(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
|
||||||
|
Loading…
Reference in New Issue
Block a user