[New-bugs-announce] [issue12608] crash in PyAST_Compile when running Python code
Albert Zeyer
report at bugs.python.org
Fri Jul 22 15:13:27 CEST 2011
New submission from Albert Zeyer <albzey at googlemail.com>:
Code:
```
import ast
globalsDict = {}
fAst = ast.FunctionDef(
name="foo",
args=ast.arguments(
args=[], vararg=None, kwarg=None, defaults=[],
kwonlyargs=[], kw_defaults=[]),
body=[], decorator_list=[])
exprAst = ast.Interactive(body=[fAst])
ast.fix_missing_locations(exprAst)
compiled = compile(exprAst, "<foo>", "single")
eval(compiled, globalsDict, globalsDict)
print(globalsDict["foo"])
```
Also CPython 2.6, 2.7, 3.0 and PyPy 1.5 crashes on this.
----------
components: Interpreter Core
messages: 140873
nosy: Albert.Zeyer
priority: normal
severity: normal
status: open
title: crash in PyAST_Compile when running Python code
versions: Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12608>
_______________________________________
More information about the New-bugs-announce
mailing list