python / cpython

The Python programming language
https://www.python.org
Other
63.23k stars 30.28k forks source link

Missing error check in ast_opt.c #123171

Closed pablogsal closed 2 months ago

pablogsal commented 2 months ago
          This line was copied from `fold_iter`. So, `fold_iter` has the same issue (no error handling for NULL values on calls to `PyFrozenSet_New`). Do you think it's OK to address this issue in this PR?

_Originally posted by @Eclips4 in https://github.com/python/cpython/pull/123081#discussion_r1722687840_

Linked PRs

serhiy-storchaka commented 2 months ago

What exactly is the error?

pablogsal commented 2 months ago

What exactly is the error?

Check out https://github.com/python/cpython/pull/123172#issuecomment-2299658384