Skip to content

another temporary slice escape #17733

@jepler

Description

@jepler

Port, board and/or hardware

micropython unix port

MicroPython version

MicroPython v1.26.0-preview.391.g76f716a824.dirty on 2025-07-21; linux [GCC 12.2.0] version

Reproduction

try:
    dict()[:]
except Exception as e:
    exc = e
print(exc.value)

Expected behaviour

An exception is expected, and its value is safe to interact with

Observed behaviour

The exception's .value refers to the stacked temporary slice so the exact behavior is unpredictable. Often it shows as <> though sometimes print(exc) or dir(exc.value) will crash.

Additional Information

Discovered by fuzzing.

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpy-coreRelates to py/ directory in source

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      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