mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-28 08:01:33 +00:00
Enable clif verifier in debug mode, fix issue with verifier
This commit is contained in:
@ -443,7 +443,7 @@ impl FuncEnvironment for FunctionEnvironment {
|
|||||||
let local_memory_bound = func.create_global_value(ir::GlobalValueData::Load {
|
let local_memory_bound = func.create_global_value(ir::GlobalValueData::Load {
|
||||||
base: local_memory_ptr,
|
base: local_memory_ptr,
|
||||||
offset: (vm::LocalMemory::offset_bound() as i32).into(),
|
offset: (vm::LocalMemory::offset_bound() as i32).into(),
|
||||||
global_type: ptr_type,
|
global_type: ir::types::I32,
|
||||||
readonly: false,
|
readonly: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -551,7 +551,7 @@ impl FuncEnvironment for FunctionEnvironment {
|
|||||||
let table_count = func.create_global_value(ir::GlobalValueData::Load {
|
let table_count = func.create_global_value(ir::GlobalValueData::Load {
|
||||||
base: table_struct_ptr,
|
base: table_struct_ptr,
|
||||||
offset: (vm::LocalTable::offset_count() as i32).into(),
|
offset: (vm::LocalTable::offset_count() as i32).into(),
|
||||||
global_type: ptr_type,
|
global_type: ir::types::I32,
|
||||||
// The table length can change, so it can't be readonly.
|
// The table length can change, so it can't be readonly.
|
||||||
readonly: false,
|
readonly: false,
|
||||||
});
|
});
|
||||||
@ -673,7 +673,8 @@ impl FuncEnvironment for FunctionEnvironment {
|
|||||||
colocated: false,
|
colocated: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
pos.ins().symbol_value(ir::types::I64, sig_index_global)
|
let val = pos.ins().symbol_value(ir::types::I64, sig_index_global);
|
||||||
|
pos.ins().ireduce(ir::types::I32, val)
|
||||||
|
|
||||||
// let dynamic_sigindices_array_ptr = pos.ins().load(
|
// let dynamic_sigindices_array_ptr = pos.ins().load(
|
||||||
// ptr_type,
|
// ptr_type,
|
||||||
|
@ -42,7 +42,9 @@ fn get_isa() -> Box<dyn isa::TargetIsa> {
|
|||||||
builder.set("opt_level", "speed_and_size").unwrap();
|
builder.set("opt_level", "speed_and_size").unwrap();
|
||||||
builder.set("jump_tables_enabled", "false").unwrap();
|
builder.set("jump_tables_enabled", "false").unwrap();
|
||||||
|
|
||||||
if cfg!(not(test)) {
|
if cfg!(test) || cfg!(debug_assertions) {
|
||||||
|
builder.set("enable_verifier", "true").unwrap();
|
||||||
|
} else {
|
||||||
builder.set("enable_verifier", "false").unwrap();
|
builder.set("enable_verifier", "false").unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user