mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-27 15:41:33 +00:00
Remove unsafe transmute copy
This commit is contained in:
@ -369,8 +369,6 @@ impl RunnableModule for X64ExecutionContext {
|
|||||||
num_params_plus_one: Option<NonNull<c_void>>,
|
num_params_plus_one: Option<NonNull<c_void>>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let rm: &Box<dyn RunnableModule> = &(&*(*ctx).module).runnable_module.borrow();
|
let rm: &Box<dyn RunnableModule> = &(&*(*ctx).module).runnable_module.borrow();
|
||||||
let execution_context =
|
|
||||||
mem::transmute_copy::<&dyn RunnableModule, &X64ExecutionContext>(&&**rm);
|
|
||||||
|
|
||||||
let args =
|
let args =
|
||||||
slice::from_raw_parts(args, num_params_plus_one.unwrap().as_ptr() as usize - 1);
|
slice::from_raw_parts(args, num_params_plus_one.unwrap().as_ptr() as usize - 1);
|
||||||
@ -502,7 +500,7 @@ impl RunnableModule for X64ExecutionContext {
|
|||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Some(execution_context.breakpoints.clone()),
|
rm.get_breakpoints(),
|
||||||
) {
|
) {
|
||||||
Ok(x) => {
|
Ok(x) => {
|
||||||
if !rets.is_null() {
|
if !rets.is_null() {
|
||||||
|
Reference in New Issue
Block a user