[issue9319] segfault when searching modules with help()

Stefan Krah report at bugs.python.org
Wed Jul 21 12:08:21 CEST 2010


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Looks like tok->filename isn't set in PyTokenizer_FromFile:


Index: Parser/tokenizer.c
===================================================================
--- Parser/tokenizer.c  (revision 82984)
+++ Parser/tokenizer.c  (working copy)
@@ -818,6 +818,7 @@
     tok->cur = tok->inp = tok->buf;
     tok->end = tok->buf + BUFSIZ;
     tok->fp = fp;
+    tok->filename = "XXX";
     tok->prompt = ps1;
     tok->nextprompt = ps2;
     if (enc != NULL) {

----------
nosy: +pitrou, skrah
priority: normal -> high
resolution:  -> accepted

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


More information about the Python-bugs-list mailing list