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 <rep...@bugs.python.org> <http://bugs.python.org/issue24828> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com