Skip to content

basicblock_addop Assertion: while-else-loop with try #109719

@15r10nk

Description

@15r10nk

Bug report

Bug description:

while name_5:
    try:
        break
    except:
        pass
else:
    1 if 1 else 1

output (Python 3.12.0rc3+):

python: Python/flowgraph.c:114: basicblock_addop: Assertion `0 <= oparg && oparg < (1 << 30)' failed.

@iritkatriel I think this looks similar to #109627

I tested this bug with faa8003 and the fix does not solve this issue.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixesrelease-blockertype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    Status

    Done

    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