rust-lang / rust-lang/stacker

Consider optionally setting up a signal handler that reports stack buffer overruns more nicely

Open
#59 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
360
Forks
78
PR merge metrics
No merged PRs in 30d

Description

The Rust runtime sets up a signal handler which enables it to produce a nicer message when a stack overflows, however this only works when the guard pages set up by the Rust standard library itself are hit. That is, for the main stack and for the stack of the threads created std::thread.

There may be value in stacker setting up a similar signal handler(s) for the guard pages it sets up by itself, but the functionality likely wants to be made optional (in order to reduce the cost of allocating/deallocating a stack region)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Rust runtime implementation in library/std/src/sys/unix/stack_overflow.rs, then trace how stacker creates and frees its own guard-page-backed stacks. Determine which signal handler behavior is needed and where an optional configuration should live. Done means stack overrun reporting works for stacker-managed stacks without imposing the cost when disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.