mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Skip push/pop code version on Windows.
This commit is contained in:
parent
5da44c3bf8
commit
ee7b0d625a
@ -687,27 +687,37 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
#[cfg(not(feature = "managed"))]
|
||||
{
|
||||
use wasmer_runtime::error::RuntimeError;
|
||||
#[cfg(unix)]
|
||||
use wasmer_runtime_core::{
|
||||
fault::{pop_code_version, push_code_version},
|
||||
state::CodeVersion,
|
||||
};
|
||||
|
||||
let cv_pushed = if let Some(msm) =
|
||||
instance.module.runnable_module.get_module_state_map()
|
||||
let result;
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
push_code_version(CodeVersion {
|
||||
baseline: true,
|
||||
msm: msm,
|
||||
base: instance.module.runnable_module.get_code().unwrap().as_ptr() as usize,
|
||||
backend: options.backend,
|
||||
});
|
||||
true
|
||||
} else {
|
||||
false
|
||||
};
|
||||
let result = start.call();
|
||||
if cv_pushed {
|
||||
pop_code_version().unwrap();
|
||||
let cv_pushed =
|
||||
if let Some(msm) = instance.module.runnable_module.get_module_state_map() {
|
||||
push_code_version(CodeVersion {
|
||||
baseline: true,
|
||||
msm: msm,
|
||||
base: instance.module.runnable_module.get_code().unwrap().as_ptr()
|
||||
as usize,
|
||||
backend: options.backend,
|
||||
});
|
||||
true
|
||||
} else {
|
||||
false
|
||||
};
|
||||
result = start.call();
|
||||
if cv_pushed {
|
||||
pop_code_version().unwrap();
|
||||
}
|
||||
}
|
||||
#[cfg(not(unix))]
|
||||
{
|
||||
result = start.call();
|
||||
}
|
||||
|
||||
if let Err(ref err) = result {
|
||||
|
Loading…
Reference in New Issue
Block a user