program-examples icon indicating copy to clipboard operation
program-examples copied to clipboard

Error building program-examples/basics/account-data/native: Stack offset of 4584 exceeded max offset of 4096

Open ksolana opened this issue 1 year ago • 2 comments

$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

ksolana avatar Feb 18 '24 07:02 ksolana

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

jim4067 avatar Apr 06 '24 18:04 jim4067

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.

XuananLe avatar Jul 03 '24 08:07 XuananLe