program-examples
program-examples copied to clipboard
Error building program-examples/basics/account-data/native: Stack offset of 4584 exceeded max offset of 4096
$cd program-examples/basics/account-data/native
$bash cicd.sh
Error: Function _ZN112_$LT$solana_program..instruction..InstructionError$u20$as$u20$solana_frozen_abi..abi_example..AbiEnumVisitor$GT$13visit_for_abi17hd07a5f9ab7b9f369E Stack offset of 4584 exceeded max offset of 4096 by 488 bytes, please minimize large stack variables
The most likely reason is that you are using an older version of solana CLI. With 1.18.2 this issue seems to be resolved
ref https://github.com/solana-labs/solana/issues/35003
Also, use the stack exchange for any solana related query
You can delete the target folder and then try to anchor build again. When you first deploy your program, you are only allocated twice as much as the space needed. When your new program get upgraded, the space is not enough.