[issue41697] Heap buffer overflow in the parser

Guido van Rossum report at bugs.python.org
Thu Sep 3 18:38:14 EDT 2020


Guido van Rossum <guido at python.org> added the comment:

Hm, I don't believe that will work -- each node type (e.g. `expr_ty`,
`mod_ty`) has its own enum for `kind` (e.g. `_expr_kind`, `_mod_kind`) and
some don't have a `kind` field at all (e.g. `keyword_ty`). So you'd have to
add an extra field to each node type and initialize that with yet another
enum that can be used to distinguish between node *types*. (There are other
options, but they all sound like a lot of work.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41697>
_______________________________________


More information about the Python-bugs-list mailing list