rust-lang / rust-lang/rust

Write down where all the unwind/backtrace code is

Open
#130,257 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-backtrace A-docs A-runtime C-enhancement E-tedious T-compiler T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location

It's in at least three different locations, depending on how you count! That's the problem!

Summary

Internal-facing documentation, mostly?

The problem is this, essentially: we have our internal unwinding/backtrace-related code in

  • library/backtrace
  • library/panic_abort
  • library/panic_unwind
  • library/std/src/sys/personality
  • library/unwind

And the interrelationships are not so clean and obvious that you can simply follow imports, because sometimes the bridge is performed by raw compiler magic! Because, in fact, you do generally need compiler support to get a decent backtrace or to unwind correctly! So arguably I could also mention files like:

  • rustc_codegen_ssa/src/mir/block.rs

Understanding all of these should not be the exclusive province of a few wizened sages of the dark arts. They should all backref to an index that tracks them. And if any can be eliminated and merged into others without causing horrid problems, they should be.

Contributor guide

Open the contributing guide

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 inventorying the unwind and backtrace code in library/backtrace, library/panic_abort, library/panic_unwind, library/std/src/sys/personality, library/unwind, and rustc_codegen_ssa/src/mir/block.rs. Document how these locations relate, including compiler-magic bridges, in an index with backreferences; done means a newcomer can find and understand each relevant area.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.