Bumps solana_rbpf to v0.2.16 (#21492)

This commit is contained in:
Alexander Meißner
2021-11-30 16:26:36 +01:00
committed by GitHub
parent e960634909
commit c9aa7ed5ca
11 changed files with 41 additions and 43 deletions

View File

@ -16,5 +16,5 @@ solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.9.0
solana-logger = { path = "../logger", version = "=1.9.0" }
solana-program-runtime = { path = "../program-runtime", version = "=1.9.0" }
solana-sdk = { path = "../sdk", version = "=1.9.0" }
solana_rbpf = "=0.2.15"
solana_rbpf = "=0.2.16"
time = "0.3.5"

View File

@ -10,9 +10,10 @@ use solana_program_runtime::invoke_context::{
};
use solana_rbpf::{
assembler::assemble,
elf::Executable,
static_analysis::Analysis,
verifier::check,
vm::{Config, DynamicAnalysis, Executable},
vm::{Config, DynamicAnalysis},
};
use solana_sdk::{account::AccountSharedData, bpf_loader, pubkey::Pubkey};
use std::{fs::File, io::Read, io::Seek, io::SeekFrom, path::Path};
@ -230,7 +231,7 @@ native machine code before execting it in the virtual machine.",
file.read_to_end(&mut contents).unwrap();
let syscall_registry = register_syscalls(&mut invoke_context).unwrap();
let mut executable = if magic == [0x7f, 0x45, 0x4c, 0x46] {
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
Executable::<BpfError, ThisInstructionMeter>::from_elf(
&contents,
None,
config,
@ -252,7 +253,7 @@ native machine code before execting it in the virtual machine.",
check(text_bytes, &config).unwrap();
}
executable.jit_compile().unwrap();
let analysis = Analysis::from_executable(executable.as_ref());
let analysis = Analysis::from_executable(&executable);
match matches.value_of("use") {
Some("cfg") => {
@ -271,7 +272,7 @@ native machine code before execting it in the virtual machine.",
let id = bpf_loader::id();
let mut vm = create_vm(
&id,
executable.as_ref(),
&executable,
parameter_bytes.as_slice_mut(),
&mut invoke_context,
&account_lengths,
@ -291,7 +292,7 @@ native machine code before execting it in the virtual machine.",
if matches.is_present("trace") {
println!("Trace is saved in trace.out");
let mut file = File::create("trace.out").unwrap();
let analysis = Analysis::from_executable(executable.as_ref());
let analysis = Analysis::from_executable(&executable);
vm.get_tracer().write(&mut file, &analysis).unwrap();
}
if matches.is_present("profile") {