Scratch memory isn't reentrant with inout params
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
For example
- enter an _un_buffered may-block syscall like
read() - fudge a pointer into scratch memory for the outparam buf argument to read
read()is interrupted by a signal- the signal handler enters another may-block syscall, say
recv() - try to set up scratch pointers
Boom.
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 by tracing scratch-memory setup for inout parameters around the reported read() and recv() may-block syscall sequence, including interruption by a signal handler. Reproduce the nested syscall case and inspect how scratch pointers are allocated and restored; done means the sequence no longer corrupts or reuses scratch memory incorrectly, with regression coverage for reentrancy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100