rust-lang / rust-lang/reference
asm.rules.stack-below-sp is ambiguous
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
Stacks can grow in different directions and diagrams can be top-to-bottom or bottom-to-top.
Apparently the SPARC arch can select whether the stack grows up or down.
This section of the reference talks about stack space below the stack pointer, but because of different models of how stacks can work, it's not entirely clear what that means.
- If the text is meant 'by address', then the rule changes based on the arch
- If the text is meant logically, then it should probably say so. And it should still specify the direction.
Instead of up and down, maybe it should be specified in terms of 'used' vs 'potential' stack? Or 'active' and 'inactive'?
Or maybe describe the contents you're allowed to interact with. For example, are you allowed to read the stack frame of the caller of the current function?
The more I read the current text, the less I'm sure what it actually says.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Rust Reference inline-assembly section linked in the issue, especially the rule named asm.rules.stack-below-sp, and compare its wording with the SPARC stack-direction behavior mentioned. Clarify whether the rule is address-based or logical, specify the relevant direction or stack region, and ensure the resulting text explains what stack contents may be accessed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100