Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

Michael, can you try with this patch:

diff --git a/Parser/pegen.c b/Parser/pegen.c
index 53e3d49138..7faeec26ad 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -528,7 +528,7 @@ _get_keyword_or_name_type(Parser *p, const char *name, int 
name_len)
     if (name_len >= p->n_keyword_lists || p->keywords[name_len] == NULL) {
         return NAME;
     }
-    for (KeywordToken *k = p->keywords[name_len]; k->type != -1; k++) {
+    for (KeywordToken *k = p->keywords[name_len]; k != NULL && k->type != -1; 
k++) {
         if (strncmp(k->str, name, name_len) == 0) {
             return k->type;
         }


For whatever reasons, it seems that me are calling into 
_get_keyword_or_name_type with a name_len of 0.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41215>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to