New GitHub issue #118544 from babygrimes:<br>

<hr>

<pre>
### Bug description:

```python
# 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:~]$ python3.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
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/118544">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>