[issue11383] compilation seg faults on insanely large expressions

Nick Coghlan report at bugs.python.org
Sun Nov 4 08:47:25 CET 2012


Nick Coghlan added the comment:

I've started looking into what would be needed to fix this. The basic problem is that the compilation process involves many recursive operations, but doesn't contain *any* calls to the recursion control functions (http://docs.python.org/3/c-api/exceptions.html#recursion-control).

Files to be investigated:
Python/ast.c
Python/symtable.c
Python/compile.c

Suspicion should fall immediately on any functions in these files which end with "_stmt" and "_expr". The reason as that these are the self-recursive constructs in the Python grammar: statements can contain other statements (via the compound statements with their nested suites) and expressions can contain other expressions.

The symtable analysis also recurses through the block stack via the "analyze_block" function, making that another candidate for flagging with the recursive call functions.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11383>
_______________________________________


More information about the Python-bugs-list mailing list