Skip to content

basicblock_addop Assertion: while-loop with if-expression #109823

Closed
@15r10nk

Description

@15r10nk

Bug report

Bug description:

while x:
    0 if 1 else 0 # 1 can not be 0 to reproduce this bug

output (Python 3.12.0rc3+):

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

I tested this with the current 3.12 branch (6f1d455)
@iritkatriel I think this is again something like #109719 or #109627

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

Labels

3.12bugs and security fixes3.13bugs and security fixesrelease-blockertype-bugAn unexpected behavior, bug, or error

Projects

  • Status

    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions