The regression was introduced by: #131738: optimize builtin any/all/tuple calls with a generator expression arg (#131737)
I'm guessing the missing syntax check means we have an async iter inside the call, and the optimized path is assunming it's a sync iter? I'm not an expert here.
Reproducible on Macos and linux builds.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.3 (main, Feb 19 2026, 15:40:46) [Clang 17.0.0 (clang-1700.6.3.2)]
changed the title [-]Segfault with invalid await and inline-for in tuple()/any/all call gh-131738[/-][+]Segfault with async generator expressions[/+]on Apr 29, 2026
Activity
stestagg commented on Apr 29, 2026
Tagging the commit author: @iritkatriel
iritkatriel commented on Apr 29, 2026
Thank you @stestagg. I've submitted a fix.
Merge branch 'main' into pythongh-149122
gh-149122: Fix segfault in compiler when certain builtin functions ar…
[3.14] gh-149122: Fix segfault in compiler when certain builtin funct…
encukou commented on Apr 30, 2026
This introduced a refleak.
gh-149122: Fix refleak in codegen (GH-149179)
[3.14] gh-149122: Fix refleak in codegen (GH-149179) (#149181)