Enforce host aligned memory for program regions (#16590)
This commit is contained in:
4
programs/bpf/Cargo.lock
generated
4
programs/bpf/Cargo.lock
generated
@ -3595,9 +3595,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "solana_rbpf"
|
||||
version = "0.2.7"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "14e36c51d5aa290416c5dea3c43ac467cb57c0b643184af23e6bdab7434710fb"
|
||||
checksum = "7fcec120278017a67e2dd98494dfdd8e565f53f1d05ab558d1656c369c5dd95e"
|
||||
dependencies = [
|
||||
"byteorder 1.3.4",
|
||||
"combine",
|
||||
|
@ -29,7 +29,7 @@ solana-bpf-loader-program = { path = "../bpf_loader", version = "=1.7.0" }
|
||||
solana-cli-output = { path = "../../cli-output", version = "=1.7.0" }
|
||||
solana-logger = { path = "../../logger", version = "=1.7.0" }
|
||||
solana-measure = { path = "../../measure", version = "=1.7.0" }
|
||||
solana_rbpf = "=0.2.7"
|
||||
solana_rbpf = "=0.2.8"
|
||||
solana-runtime = { path = "../../runtime", version = "=1.7.0" }
|
||||
solana-sdk = { path = "../../sdk", version = "=1.7.0" }
|
||||
solana-transaction-status = { path = "../../transaction-status", version = "=1.7.0" }
|
||||
|
@ -75,9 +75,12 @@ fn bench_program_create_executable(bencher: &mut Bencher) {
|
||||
let elf = load_elf("bench_alu").unwrap();
|
||||
|
||||
bencher.iter(|| {
|
||||
let _ =
|
||||
<dyn Executable::<BpfError, ThisInstructionMeter>>::from_elf(&elf, None, Config::default())
|
||||
.unwrap();
|
||||
let _ = <dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(
|
||||
&elf,
|
||||
None,
|
||||
Config::default(),
|
||||
)
|
||||
.unwrap();
|
||||
});
|
||||
}
|
||||
|
||||
@ -95,7 +98,7 @@ fn bench_program_alu(bencher: &mut Bencher) {
|
||||
|
||||
let elf = load_elf("bench_alu").unwrap();
|
||||
let mut executable =
|
||||
<dyn Executable::<BpfError, ThisInstructionMeter>>::from_elf(&elf, None, Config::default())
|
||||
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(&elf, None, Config::default())
|
||||
.unwrap();
|
||||
executable.set_syscall_registry(register_syscalls(&mut invoke_context).unwrap());
|
||||
executable.jit_compile().unwrap();
|
||||
@ -223,7 +226,7 @@ fn bench_instruction_count_tuner(_bencher: &mut Bencher) {
|
||||
|
||||
let elf = load_elf("tuner").unwrap();
|
||||
let mut executable =
|
||||
<dyn Executable::<BpfError, ThisInstructionMeter>>::from_elf(&elf, None, Config::default())
|
||||
<dyn Executable<BpfError, ThisInstructionMeter>>::from_elf(&elf, None, Config::default())
|
||||
.unwrap();
|
||||
executable.set_syscall_registry(register_syscalls(&mut invoke_context).unwrap());
|
||||
let compute_meter = invoke_context.get_compute_meter();
|
||||
@ -231,7 +234,7 @@ fn bench_instruction_count_tuner(_bencher: &mut Bencher) {
|
||||
let mut vm = create_vm(
|
||||
&loader_id,
|
||||
executable.as_ref(),
|
||||
&mut serialized,
|
||||
serialized.as_slice_mut(),
|
||||
&mut invoke_context,
|
||||
)
|
||||
.unwrap();
|
||||
|
@ -217,7 +217,7 @@ fn run_program(
|
||||
let mut vm = create_vm(
|
||||
&loader_id,
|
||||
executable.as_ref(),
|
||||
&mut parameter_bytes,
|
||||
parameter_bytes.as_slice_mut(),
|
||||
&mut invoke_context,
|
||||
)
|
||||
.unwrap();
|
||||
@ -256,7 +256,7 @@ fn run_program(
|
||||
deserialize_parameters(
|
||||
&bpf_loader::id(),
|
||||
parameter_accounts,
|
||||
¶meter_bytes,
|
||||
parameter_bytes.as_slice(),
|
||||
true,
|
||||
)
|
||||
.unwrap();
|
||||
|
Reference in New Issue
Block a user