MCPcopy Create free account
hub / github.com/PLSysSec/wave / copy_arg_buffer_to_sandbox

Method copy_arg_buffer_to_sandbox

src/runtime.rs:166–174  ·  view source on GitHub ↗
(&mut self, dst: SboxPtr, n: u32)

Source from the content-addressed store, hash-verified

164 #[ensures(ctx_safe(self))]
165 #[ensures(trace_safe(trace, self))]
166 pub fn copy_arg_buffer_to_sandbox(&mut self, dst: SboxPtr, n: u32) -> RuntimeResult<()> {
167 if !self.fits_in_lin_mem(dst, n) {
168 return Err(Efault);
169 }
170 // let arg_buffer = self.arg_buffer.clone();
171 let arg_buffer = clone_vec_u8(&self.arg_buffer);
172 self.memcpy_to_sandbox(dst, &arg_buffer, n);
173 Ok(())
174 }
175
176 /// Copy arg buffer from from host to sandbox
177 #[with_ghost_var(trace: &mut Trace)]

Callers 1

wasi_args_getFunction · 0.80

Calls 3

clone_vec_u8Function · 0.85
fits_in_lin_memMethod · 0.80
memcpy_to_sandboxMethod · 0.80

Tested by

no test coverage detected