Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOL] Allocate call arguments on a fixed stack object #84

Merged

Conversation

LucasSte
Copy link
Collaborator

When dynamic stack frames are enabled, we cannot allocate call arguments on the stack framed based on the old 4096 bytes offset, so a new solution is needed for such a case.

As we cannot know the stack size during code generation, and we cannot read the stack pointer register R11 (the SBF verifier does not allow it), we allocate fixed stack objects on the start of the caller frame and read them via the R5 register in the callee.

@LucasSte LucasSte marked this pull request as ready for review January 29, 2024 15:49
@LucasSte LucasSte requested a review from dmakarov January 29, 2024 15:49
@LucasSte LucasSte requested a review from dmakarov January 29, 2024 22:09
@dmakarov
Copy link
Collaborator

When merging, please use the 'squash and merge' option to reduce the number of commits we need to consider in the future updates from the upstream.

@LucasSte LucasSte merged commit 7a686ea into anza-xyz:solana-rustc/16.0-2023-06-05 Jan 30, 2024
14 checks passed
@LucasSte LucasSte deleted the fix-stack-bug branch January 30, 2024 12:35
LucasSte added a commit to LucasSte/llvm-project that referenced this pull request Jan 31, 2024
LucasSte added a commit to LucasSte/llvm-project that referenced this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants