Sean Reifschneider added the comment:
Confirmed problem (used 4.5GB before I killed it), and that the second
patch resolved the problem. I'm uploading the inline patch as an
attachment, with the directory name in it as well (from svn diff).
Bumping the priority to high because the side effect can cause all sorts
of problems on a system including other processes being killed.
----------
nosy: +jafo
priority: -> high
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1134>
__________________________________
Index: Parser/tokenizer.c
===================================================================
--- Parser/tokenizer.c (revision 58192)
+++ Parser/tokenizer.c (working copy)
@@ -395,6 +395,7 @@
goto error;
buflen = size;
}
+
memcpy(s, buf, buflen);
s[buflen] = '\0';
if (buflen == 0) /* EOF */
@@ -402,6 +403,12 @@
if (allocated) {
Py_DECREF(bufobj);
}
+
+ if ( bufobj == tok->decoding_buffer ){
+ Py_XDECREF(tok->decoding_buffer);
+ tok->decoding_buffer = 0;
+ }
+
return s;
error:
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com