rust-lang / rust-lang/rust

Possible regression with rust_panic being mangled

Open
#140,821 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-panic C-discussion T-compiler T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I think this pr https://github.com/rust-lang/rust/pull/127173 changed rust_panic to be mangled which breaks gdb breaking on it with rust_panic name. The comment in https://github.com/rust-lang/rust/blob/e964ccafedcf7a505f90f31370d568e649286176/library/std/src/panicking.rs#L888 says that it should be unmangled, likely #[no_mangle] should be added to it or stabilize some other name for it as else you have to rely on the internal mangled name __rustc::rust_panic in e.g. Intellij Rust plugin or other things that want to add a breakpoint to it.

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 in library/std/src/panicking.rs around the comment at line 888 and compare the symbol change introduced by pull request 127173. Reproduce the debugger breakpoint behavior described in the issue, then verify that the panic entry point has a stable unmangled name usable by GDB and IDE integrations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.