-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed as not planned
Closed as not planned
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
# Add a code block here, if required
async def test():
async with (
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
cm(),
# cm(),
):
pass
The above code (with the final cm() commented out) will cause a Segmentation Fault on Ubuntu 22.04. This works as expected on Python3.11.
[dmgrime@dave-laptop:~]$ python3.11 breakme.py
[dmgrime@dave-laptop:~]$ python3.12 breakme.py
Segmentation fault
Note: commenting out an additional cm() works as expected in both Python3.11 and Python3.12 (no exception, no seg fault).
[dmgrime@dave-laptop:~]$ py
5A49
thon3.11 breakme.py
[dmgrime@dave-laptop:~]$ python3.12 breakme.py
[dmgrime@dave-laptop:~]$
Note: uncommenting the final cm() works as expected in both Python3.11 and Python3.12 (exception but no seg fault).
[dmgrime@dave-laptop:~]$ python3.11 breakme.py
File "/home/dmgrime/breakme.py", line 2
async with (
^^^^^^^^^^^^
SyntaxError: too many statically nested blocks
[dmgrime@dave-laptop:~]$ python3.12 breakme.py
File "/home/dmgrime/breakme.py", line 2
async with (
^^^^^^^^^^^^
SyntaxError: too many statically nested blocks
[dmgrime@dave-laptop:~]$
CPython versions tested on:
3.11, 3.12
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error