Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_testinternalcapi.compiler_codegen segfaults on bad input #115376

Closed
iritkatriel opened this issue Feb 12, 2024 · 0 comments · Fixed by #115379
Closed

_testinternalcapi.compiler_codegen segfaults on bad input #115376

iritkatriel opened this issue Feb 12, 2024 · 0 comments · Fixed by #115379

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Feb 12, 2024

This segfaults:

import ast
from _testinternalcapi import compiler_codegen

a = ast.parse("return 42", "my_file.py", "exec")
compiler_codegen(a, "my_file.py", 0)

Expected SyntaxError (return not in function).

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant