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:
committed by
GitHub
parent
04787be8b1
commit
8d5c04e257
@ -15,4 +15,4 @@ serde_json = "1.0.64"
|
||||
solana-bpf-loader-program = { path = "../programs/bpf_loader", version = "=1.8.0" }
|
||||
solana-logger = { path = "../logger", version = "=1.8.0" }
|
||||
solana-sdk = { path = "../sdk", version = "=1.8.0" }
|
||||
solana_rbpf = "=0.2.12"
|
||||
solana_rbpf = "=0.2.13"
|
||||
|
@ -185,14 +185,21 @@ native machine code before execting it in the virtual machine.",
|
||||
file.seek(SeekFrom::Start(0)).unwrap();
|
||||
let mut contents = Vec::new();
|
||||
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(&contents, None, config)
|
||||
.map_err(|err| format!("Executable constructor failed: {:?}", err))
|
||||
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
&contents,
|
||||
None,
|
||||
config,
|
||||
syscall_registry,
|
||||
)
|
||||
.map_err(|err| format!("Executable constructor failed: {:?}", err))
|
||||
} else {
|
||||
assemble::<BpfError, ThisInstructionMeter>(
|
||||
std::str::from_utf8(contents.as_slice()).unwrap(),
|
||||
None,
|
||||
config,
|
||||
syscall_registry,
|
||||
)
|
||||
}
|
||||
.unwrap();
|
||||
@ -201,7 +208,6 @@ native machine code before execting it in the virtual machine.",
|
||||
let (_, elf_bytes) = executable.get_text_bytes().unwrap();
|
||||
check(elf_bytes).unwrap();
|
||||
}
|
||||
executable.set_syscall_registry(register_syscalls(&mut invoke_context).unwrap());
|
||||
executable.jit_compile().unwrap();
|
||||
let analysis = Analysis::from_executable(executable.as_ref());
|
||||
|
||||
|
Reference in New Issue
Block a user