@@ -38,8 +38,9 @@ use solana_sdk::{
38
38
entrypoint:: { HEAP_LENGTH , SUCCESS } ,
39
39
feature_set:: {
40
40
do_support_realloc, reduce_required_deploy_balance,
41
- reject_deployment_of_unresolved_syscalls, requestable_heap_size,
42
- stop_verify_mul64_imm_nonzero,
41
+ reject_deployment_of_unresolved_syscalls,
42
+ reject_section_virtual_address_file_offset_mismatch, requestable_heap_size,
43
+ start_verify_shift32_imm, stop_verify_mul64_imm_nonzero,
43
44
} ,
44
45
instruction:: { AccountMeta , InstructionError } ,
45
46
keyed_account:: { from_keyed_account, keyed_account_at_index, KeyedAccount } ,
@@ -79,7 +80,7 @@ pub fn create_executor(
79
80
programdata_offset : usize ,
80
81
invoke_context : & mut InvokeContext ,
81
82
use_jit : bool ,
82
- reject_unresolved_syscalls : bool ,
83
+ reject_deployment_of_broken_elfs : bool ,
83
84
) -> Result < Arc < BpfExecutor > , InstructionError > {
84
85
let syscall_registry = syscalls:: register_syscalls ( invoke_context) . map_err ( |e| {
85
86
ic_msg ! ( invoke_context, "Failed to register syscalls: {}" , e) ;
@@ -90,13 +91,20 @@ pub fn create_executor(
90
91
max_call_depth : compute_budget. max_call_depth ,
91
92
stack_frame_size : compute_budget. stack_frame_size ,
92
93
enable_instruction_tracing : log_enabled ! ( Trace ) ,
93
- reject_unresolved_syscalls : reject_unresolved_syscalls
94
+ reject_unresolved_syscalls : reject_deployment_of_broken_elfs
94
95
&& invoke_context
95
96
. feature_set
96
97
. is_active ( & reject_deployment_of_unresolved_syscalls:: id ( ) ) ,
98
+ reject_section_virtual_address_file_offset_mismatch : reject_deployment_of_broken_elfs
99
+ && invoke_context
100
+ . feature_set
101
+ . is_active ( & reject_section_virtual_address_file_offset_mismatch:: id ( ) ) ,
97
102
verify_mul64_imm_nonzero : !invoke_context
98
103
. feature_set
99
- . is_active ( & stop_verify_mul64_imm_nonzero:: id ( ) ) , // TODO: Feature gate and then remove me
104
+ . is_active ( & stop_verify_mul64_imm_nonzero:: id ( ) ) ,
105
+ verify_shift32_imm : invoke_context
106
+ . feature_set
107
+ . is_active ( & start_verify_shift32_imm:: id ( ) ) ,
100
108
..Config :: default ( )
101
109
} ;
102
110
let mut executable = {
0 commit comments