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

Method copy_environ_buffer_to_sandbox

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

Source from the content-addressed store, hash-verified

182 #[ensures(ctx_safe(self))]
183 #[ensures(trace_safe(trace, self))]
184 pub fn copy_environ_buffer_to_sandbox(&mut self, dst: SboxPtr, n: u32) -> RuntimeResult<()> {
185 if !self.fits_in_lin_mem(dst, n) {
186 return Err(Efault);
187 }
188 // let env_buffer = self.env_buffer.clone();
189 let env_buffer = clone_vec_u8(&self.env_buffer);
190 self.memcpy_to_sandbox(dst, &env_buffer, n);
191 Ok(())
192 }
193
194 #[with_ghost_var(trace: &mut Trace)]
195 #[external_calls(resolve_path)]

Callers 1

wasi_environ_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