Bumps solana_rbpf to v0.2.16 (#21492)
This commit is contained in:
committed by
Trent Nelson
parent
e52b3fd1d8
commit
f04e06e0c2
@@ -7,9 +7,10 @@ use solana_bpf_loader_program::{
|
||||
};
|
||||
use solana_rbpf::{
|
||||
assembler::assemble,
|
||||
elf::Executable,
|
||||
static_analysis::Analysis,
|
||||
verifier::check,
|
||||
vm::{Config, DynamicAnalysis, Executable},
|
||||
vm::{Config, DynamicAnalysis},
|
||||
};
|
||||
use solana_sdk::{
|
||||
account::AccountSharedData,
|
||||
@@ -187,7 +188,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,
|
||||
@@ -209,7 +210,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") => {
|
||||
@@ -226,7 +227,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(), &mut mem, &mut invoke_context).unwrap();
|
||||
let mut vm = create_vm(&id, &executable, &mut mem, &mut invoke_context).unwrap();
|
||||
let result = if matches.value_of("use").unwrap() == "interpreter" {
|
||||
vm.execute_program_interpreted(&mut instruction_meter)
|
||||
} else {
|
||||
@@ -244,7 +245,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") {
|
||||
|
Reference in New Issue
Block a user