Revert "Bump solana_rbpf to version 0.2.13 (#18068)"
This reverts commit 765fbc9a8c
.
This commit is contained in:
@@ -88,20 +88,15 @@ pub fn create_executor(
|
||||
let config = Config {
|
||||
max_call_depth: bpf_compute_budget.max_call_depth,
|
||||
stack_frame_size: bpf_compute_budget.stack_frame_size,
|
||||
enable_instruction_meter: true,
|
||||
enable_instruction_tracing: log_enabled!(Trace),
|
||||
..Config::default()
|
||||
};
|
||||
let mut executable = {
|
||||
let keyed_accounts = invoke_context.get_keyed_accounts()?;
|
||||
let program = keyed_account_at_index(keyed_accounts, program_account_index)?;
|
||||
let account = program.try_account_ref()?;
|
||||
let data = &account.data()[program_data_offset..];
|
||||
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
data,
|
||||
None,
|
||||
config,
|
||||
syscall_registry,
|
||||
)
|
||||
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(data, None, config)
|
||||
}
|
||||
.map_err(|e| map_ebpf_error(invoke_context, e))?;
|
||||
let (_, elf_bytes) = executable
|
||||
@@ -109,6 +104,7 @@ pub fn create_executor(
|
||||
.map_err(|e| map_ebpf_error(invoke_context, e))?;
|
||||
verifier::check(elf_bytes)
|
||||
.map_err(|e| map_ebpf_error(invoke_context, EbpfError::UserError(e.into())))?;
|
||||
executable.set_syscall_registry(syscall_registry);
|
||||
if use_jit {
|
||||
if let Err(err) = executable.jit_compile() {
|
||||
ic_msg!(invoke_context, "Failed to compile program {:?}", err);
|
||||
@@ -1008,7 +1004,6 @@ mod tests {
|
||||
use {
|
||||
super::*,
|
||||
rand::Rng,
|
||||
solana_rbpf::vm::SyscallRegistry,
|
||||
solana_runtime::{bank::Bank, bank_client::BankClient},
|
||||
solana_sdk::{
|
||||
account::{
|
||||
@@ -1062,10 +1057,9 @@ mod tests {
|
||||
solana_rbpf::elf::register_bpf_function(&mut bpf_functions, 0, "entrypoint").unwrap();
|
||||
let program = <dyn Executable<BpfError, TestInstructionMeter>>::from_text_bytes(
|
||||
program,
|
||||
bpf_functions,
|
||||
None,
|
||||
Config::default(),
|
||||
SyscallRegistry::default(),
|
||||
bpf_functions,
|
||||
)
|
||||
.unwrap();
|
||||
let mut vm =
|
||||
|
Reference in New Issue
Block a user