[New-bugs-announce] [issue24828] Segfault when using store-context AST node in a load context
Xavier Morel
report at bugs.python.org
Sat Aug 8 16:03:34 CEST 2015
New submission from Xavier Morel:
It looks to be fixed in 3.3 and up, but in Python 2.7
import ast
m = ast.Module(body=[
ast.Expr(value=ast.Name(id='foo', ctx=ast.Store()))
])
ast.fix_missing_locations(m)
code = compile(m, '', mode='exec')
eval(code)
will segfault on eval. So will a similarly incorrect ast.Attribute node.
Version tested:
Python 2.7.10 (default, May 28 2015, 12:02:55)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
----------
components: Library (Lib)
messages: 248269
nosy: xmorel
priority: normal
severity: normal
status: open
title: Segfault when using store-context AST node in a load context
type: crash
versions: Python 2.7, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24828>
_______________________________________
More information about the New-bugs-announce
mailing list