From 34639f764723cd4ae365259994378c37eb4e9bd2 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Thu, 10 Sep 2020 20:40:33 +0900 Subject: [PATCH 1/2] Restore compat. with mainnet-beta --- programs/bpf_loader/src/syscalls.rs | 4 ++-- runtime/src/bank.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/bpf_loader/src/syscalls.rs b/programs/bpf_loader/src/syscalls.rs index 8e637a05fd3a21..7c23068f7b5203 100644 --- a/programs/bpf_loader/src/syscalls.rs +++ b/programs/bpf_loader/src/syscalls.rs @@ -169,7 +169,7 @@ macro_rules! translate { #[macro_export] macro_rules! translate_type_mut { ($t:ty, $vm_addr:expr, $regions:expr) => {{ - if ($vm_addr as u64 as *mut $t).align_offset(align_of::<$t>()) != 0 { + if false && ($vm_addr as u64 as *mut $t).align_offset(align_of::<$t>()) != 0 { Err(SyscallError::UnalignedPointer.into()) } else { unsafe { @@ -200,7 +200,7 @@ macro_rules! translate_type { #[macro_export] macro_rules! translate_slice_mut { ($t:ty, $vm_addr:expr, $len: expr, $regions:expr) => {{ - if ($vm_addr as u64 as *mut $t).align_offset(align_of::<$t>()) != 0 { + if false && ($vm_addr as u64 as *mut $t).align_offset(align_of::<$t>()) != 0 { Err(SyscallError::UnalignedPointer.into()) } else { match translate_addr::( diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 77e607e18b977e..dc03d11e022bcc 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -1876,6 +1876,7 @@ impl Bank { &self.rent_collector, log_collector.clone(), ); + trace!("bank (slot: {}) executed a transaction with result: {} => {:?}", self.slot(), tx.signatures[0], process_result); Self::refcells_to_accounts( accounts, From cd3a2ed2a032dcafa973f45112d2cc85fab0e19c Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Thu, 10 Sep 2020 23:16:46 +0900 Subject: [PATCH 2/2] Rustfmt --- runtime/src/bank.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index dc03d11e022bcc..d9706a7eef43ee 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -1876,7 +1876,12 @@ impl Bank { &self.rent_collector, log_collector.clone(), ); - trace!("bank (slot: {}) executed a transaction with result: {} => {:?}", self.slot(), tx.signatures[0], process_result); + trace!( + "bank (slot: {}) executed a transaction with result: {} => {:?}", + self.slot(), + tx.signatures[0], + process_result + ); Self::refcells_to_accounts( accounts,