Fix more BPF alignment issues on arm64

This commit is contained in:
Michael Vines
2021-11-30 10:41:15 -08:00
parent a54fa45d5a
commit e5aa5efbac
3 changed files with 13 additions and 16 deletions

View File

@@ -16,7 +16,7 @@ use solana_sdk::{
bpf_loader, bpf_loader_deprecated,
bpf_loader_upgradeable::{self, UpgradeableLoaderState},
clock::Clock,
entrypoint::{MAX_PERMITTED_DATA_INCREASE, SUCCESS},
entrypoint::{BPF_ALIGN_OF_U128, MAX_PERMITTED_DATA_INCREASE, SUCCESS},
epoch_schedule::EpochSchedule,
feature_set::{
allow_native_ids, check_seed_length, close_upgradeable_program_accounts, cpi_data_cost,
@@ -825,7 +825,7 @@ impl SyscallObject<BpfError> for SyscallAllocFree {
result: &mut Result<u64, EbpfError<BpfError>>,
) {
let align = if self.aligned {
align_of::<u128>()
BPF_ALIGN_OF_U128
} else {
align_of::<u8>()
};