diff --git a/3rdparty/anchor b/3rdparty/anchor index f6fc2fc00..d3b38ff57 160000 --- a/3rdparty/anchor +++ b/3rdparty/anchor @@ -1 +1 @@ -Subproject commit f6fc2fc00efee7f81abd78227a229bcb9a753166 +Subproject commit d3b38ff57107aec1086ace8dabc43a91a67ef0b3 diff --git a/programs/openbook-v2/src/state/orderbook/nodes.rs b/programs/openbook-v2/src/state/orderbook/nodes.rs index 08ef8d8e3..7bbfa2fd9 100644 --- a/programs/openbook-v2/src/state/orderbook/nodes.rs +++ b/programs/openbook-v2/src/state/orderbook/nodes.rs @@ -237,13 +237,12 @@ impl LeafNode { #[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] +#[repr(align(8))] pub struct FreeNode { pub(crate) tag: u8, // NodeTag pub(crate) padding: [u8; 3], pub(crate) next: NodeHandle, - pub(crate) reserved: [u8; NODE_SIZE - 16], - // essential to make AnyNode alignment the same as other node types - pub(crate) force_align: u64, + pub(crate) reserved: [u8; NODE_SIZE - 8], } const_assert_eq!(size_of::(), NODE_SIZE); const_assert_eq!(size_of::() % 8, 0); @@ -254,6 +253,7 @@ pub struct AnyNode { pub tag: u8, pub data: [u8; 79], // essential to make AnyNode alignment the same as other node types + // should prefer repr(align(8)), but that's not compatible with anchor's zero_copy attribute pub force_align: u64, } const_assert_eq!(size_of::(), NODE_SIZE);