rust-lang / rust-lang/rust

rustlib lldb provider crash

Open
#156,420 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-debuggers-lldb C-bug needs-triage
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

I tried to debug this code:

https://github.com/wfjsw/shitspeak-rs/blob/11ee95907ec81fa23bf3d65529ff167536835dce/src/voice/codec.rs#L539

A breakpoint is set on this line. After the debugger breaks, the lldb crashes after a few seconds. Could be the same as #114137 since some local variables indeed do not display, though they crashed in different places.

Image
Meta

rustc --version --verbose:

rustc 1.95.0 (59807616e 2026-04-14)
binary: rustc
commit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860
commit-date: 2026-04-14
host: x86_64-pc-windows-msvc
release: 1.95.0
LLVM version: 22.1.2
Backtrace

Traceback (most recent call last):
  File "C:\Users/synopses0130/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc\lldb_providers.py", line 784, in MSVCEnumSummaryProvider
    name: str = variant_names.enum_members[name_idx].name
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
IndexError: list index out of range
Traceback (most recent call last):
  File "C:\Users/synopses0130/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc\lldb_providers.py", line 784, in MSVCEnumSummaryProvider
    name: str = variant_names.enum_members[name_idx].name
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
IndexError: list index out of range
Traceback (most recent call last):
  File "C:\Users/synopses0130/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc\lldb_providers.py", line 784, in MSVCEnumSummaryProvider
    name: str = variant_names.enum_members[name_idx].name
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
IndexError: list index out of range
[26.250 ERROR codelldb::debug_session] error: 'header' is not a valid command.
Traceback (most recent call last):
  File "C:\Users/synopses0130/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc\lldb_providers.py", line 784, in MSVCEnumSummaryProvider
    name: str = variant_names.enum_members[name_idx].name
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
IndexError: list index out of range
Traceback (most recent call last):
  File "C:\Users/synopses0130/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc\lldb_providers.py", line 784, in MSVCEnumSummaryProvider
    name: str = variant_names.enum_members[name_idx].name
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
IndexError: list index out of range
Traceback (most recent call last):
  File "C:\Users/synopses0130/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/etc\lldb_providers.py", line 784, in MSVCEnumSummaryProvider
    name: str = variant_names.enum_members[name_idx].name
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
IndexError: list index out of range
Debug adapter exit code=3221225477, signal=null.

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 reproducing the crash with the linked codec.rs breakpoint on the Windows MSVC toolchain, then inspect rustlib/etc/lldb_providers.py around MSVCEnumSummaryProvider at line 784. Confirm how an out-of-range enum member index is reached and verify that the debugger no longer crashes while inspecting the reproduced code.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.