Bump solana_rbpf to version 0.2.13 (#18068)

* Moves syscall_registry into the rbpf Executable constructor.

* Adds the reject_unresolved_syscalls flag which is only set when deploying programs via the CLI.
This commit is contained in:
Alexander Meißner
2021-07-07 09:50:11 +02:00
committed by GitHub
parent 04787be8b1
commit 8d5c04e257
13 changed files with 98 additions and 66 deletions

View File

@@ -210,14 +210,16 @@ fn run_program(
let mut instruction_meter = ThisInstructionMeter { compute_meter };
let config = Config {
max_call_depth: 20,
stack_frame_size: 4096,
enable_instruction_meter: true,
enable_instruction_tracing: true,
..Config::default()
};
let mut executable =
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(&data, None, config).unwrap();
executable.set_syscall_registry(register_syscalls(&mut invoke_context).unwrap());
let mut executable = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
&data,
None,
config,
register_syscalls(&mut invoke_context).unwrap(),
)
.unwrap();
executable.jit_compile().unwrap();
let mut instruction_count = 0;