Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The lltrace feature can trigger infinite recursion via__repr__ #107758

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@gvanrossum

Description

@gvanrossum

When turning on the low-level interpreter tracing feature (lltrace in ceval.c) it is quite easy to hit infinite recursion indump_stack(), when an item on the stack being printed has a__repr__ method implemented in Python. (This is especially annoying when hardcodinglltrace = 1, since it will never get through the importlib bootstrap -- for some reason the__repr__ for module objects is (re-)implemented in Python.)

While I suppose we could fix this by adding some kind of protection against recursive calls todump_stack(), I think it's better to just avoid calling into Python at all by writing most objects in the form<type at address> (with exceptions for ints etc.).

CC@sweeneyde, author ofdump_stack() ingh-91463. (I don't want to just remove it -- it actually saved my bacon today.)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp