Incorrect use of `sigaction` in Unix stack overflow signal handler
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Currently the Unix stack overflow signal handler sets the sa_sigaction field to SIG_DFL in order to restore the default behavior. This however only works unintentionally.
According to the sigaction manpage the intended field to set for this purpose is sa_handler, which may or may not be an union with sa_sigaction. This issue is currently not actionable because of libc#3111, but documents the problem.
The theoretical correct code, once libc adds the sa_handler field, would be
action.sa_handler = SIG_DFL;
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 library/std/src/sys/pal/unix/stack_overflow.rs at the linked signal-handler code, then review libc#3111 for the missing sa_handler field. Once libc exposes that field, update the restoration logic and verify the Unix stack-overflow signal-handler behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100