[issue9020] 2.7: eval hangs on AIX

Sridhar Ratnakumar report at bugs.python.org
Thu Jun 17 23:46:46 CEST 2010


Sridhar Ratnakumar <sridharr at activestate.com> added the comment:

I traced the "infinite loop" to tokenizer.c:tok_get around line 1368:

        while (Py_ISALNUM(c) || c == '_') {
            c = tok_nextc(tok);
        }

Adding a `printf` statement at the beginning of the loop:

            printf("tok_get: third while: c = %c (%d) ... Py_ISALNUM=%d\n", c, c, Py_ISALNUM(c));

Output:

tok_get: third while: c = � (-1) ... Py_ISALNUM=2
tok_get: third while: c = � (-1) ... Py_ISALNUM=2
tok_get: third while: c = � (-1) ... Py_ISALNUM=2
tok_get: third while: c = � (-1) ... Py_ISALNUM=2
tok_get: third while: c = � (-1) ... Py_ISALNUM=2
tok_get: third while: c = � (-1) ... Py_ISALNUM=2
tok_get: third while: c = � (-1) ... Py_ISALNUM=2
tok_get: third while: c = � (-1) ... Py_ISALNUM=2
[...]


I may not spend much time on this bug, unless someone can hint at what might have gone wrong here?

As for 2.6-maint, I will find that out sometime this week.

----------

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


More information about the Python-bugs-list mailing list