Build warning: SBF stack frame exceeds 4096 byte limit by 8 bytes #69
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo#69
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
During anchor build on feat/solana-integration (
76c7cc6+), bridge program emits: Error: Function _ZN4core5slice4sort6stable14driftsort_main Stack offset of 4104 exceeded max offset of 4096 by 8 bytes. Estimated frame size: 4160 bytes. Program still compiles, deploys, and passes 119/119 tests on localnet. However the warning says exceeding max may cause undefined behavior during execution. Flagging for review — may need to reduce stack usage in the sort path or use heap allocation.mentioned in commit
dd7f86198b@brouie could you review when you have a moment?
Change: vendored
solana-slot-hashes2.2.1 underpackages/contracts-solana/patches/solana-slot-hashesand wired it with[patch.crates-io]inpackages/contracts-solana/Cargo.toml.SlotHashes::newnow usessort_unstable_byinstead ofsort_byso the SBF link step no longer pulls incorestable sort (driftsort_main), which was tripping the 4096-byte stack frame warning.Verify:
anchor buildinpackages/contracts-solanacompletes without the driftsort stack error.Pushed:
feat/solana-integration@dd7f861(remove the patch when upstream fixes or the toolchain changes).Verified — anchor build no longer shows stack overflow warning after patches/solana-slot-hashes. Build clean on both release and test profiles.