pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: https://github.com/python/cpython/issues/107758

ps://github.githubassets.com/assets/repository-6ec84ae2261fecf8.css" /> The lltrace feature can trigger infinite recursion via `__repr__` · Issue #107758 · python/cpython · GitHub
Skip to content

The lltrace feature can trigger infinite recursion via __repr__ #107758

@gvanrossum

Description

@gvanrossum

When turning on the low-level interpreter tracing feature (lltrace in ceval.c) it is quite easy to hit infinite recursion in dump_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 to dump_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 of dump_stack() in gh-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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





      Check this box to remove all script contents from the fetched content.



      Check this box to remove all images from the fetched content.


      Check this box to remove all CSS styles from the fetched content.


      Check this box to keep images inefficiently compressed and original size.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy