GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — remote debugging: `read_pylong` is missing a `PyErr_Format` call · Issue #148447 · python/cpython

remote debugging: read_pylong is missing a PyErr_Format call #148447

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
remote debugging: read_pylong is missing a PyErr_Format call#148447
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-profilingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@KowalskiThomas
KowalskiThomas
opened on Apr 12, 2026
Issue body actions

Bug report

Bug description:

I'm working on the Python Profiler at Datadog and while looking at how Tachyon is implemented, I noticed that I believe this error path is missing a call to PyErr_Format. This probably rarely happens (it would require the process to read corrupt memory) but I still think it's worth fixing.

I have a branch that adds the call if you're OK with adding it.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Activity

  1. KowalskiThomas
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Apr 12, 2026
  2. KowalskiThomas
    changed the title [-]remote-debugging: `read_pylong` is missing a `PyErr_Format` call[/-] [+]remote- debugging: `read_pylong` is missing a `PyErr_Format` call[/+] on Apr 12, 2026
  3. KowalskiThomas
    changed the title [-]remote- debugging: `read_pylong` is missing a `PyErr_Format` call[/-] [+]remote debugging: `read_pylong` is missing a `PyErr_Format` call[/+] on Apr 12, 2026
  4. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    topic-profiling
    on Apr 12, 2026
  5. brianschubert commented on Apr 12, 2026

    @brianschubert
    brianschubert
    on Apr 12, 2026
    Contributor
    More actions

    Looks like this was already fixed in #146309, the relevant call is present in main:

    cpython/Modules/_remote_debugging/object_reading.c

    Lines 197 to 204 in 03d2f03

    // Validate size: reject garbage (negative or unreasonably large)
    if (size < 0 || size > MAX_LONG_DIGITS) {
    PyErr_Format(PyExc_RuntimeError,
    "Invalid PyLong digit count: %zd (expected 0-%d)", size, MAX_LONG_DIGITS);
    set_exception_cause(unwinder, PyExc_RuntimeError,
    "Invalid PyLong size (corrupted remote memory)");
    return -1;
    }

  6. brianschubert
    added
    pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
    on Apr 12, 2026
  7. KowalskiThomas commented on Apr 12, 2026

    @KowalskiThomas
    KowalskiThomas
    on Apr 12, 2026
    ContributorAuthor
    More actions

    Ah! My main was outdated then, sorry for the false alarm. Closing.

    Reacted by Brian Schubert
  8. KowalskiThomas
    closed this as a duplicateof Fix error handling issues in _remote_debugging module #146308 on Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-profilingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.