File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
sdk/pinocchio/src/sysvars/slot_hashes Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11//! Tests that rely on the `std` feature (host-only helpers, alloc, etc.).
22
33use super :: * ;
4- use crate :: {
5- account_info:: { Account , AccountInfo } ,
6- pubkey:: Pubkey ,
7- } ;
4+ use crate :: account_info:: { Account , AccountInfo } ;
85use core:: ptr;
96extern crate std;
107use super :: test_utils:: * ;
Original file line number Diff line number Diff line change @@ -124,6 +124,10 @@ pub unsafe fn make_account_info(
124124 let total = hdr_size + data. len ( ) ;
125125 let words = ( total + 7 ) / 8 ;
126126 let mut backing: Vec < u64 > = std:: vec![ 0u64 ; words] ;
127+ assert ! (
128+ mem:: align_of:: <u64 >( ) >= mem:: align_of:: <AccountLayout >( ) ,
129+ "`backing` should be properly aligned to store an `AccountLayout` instance"
130+ ) ;
127131
128132 let hdr_ptr = backing. as_mut_ptr ( ) as * mut AccountLayout ;
129133 ptr:: write (
You can’t perform that action at this time.
0 commit comments