This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thyrsus
Recipients thyrsus
Date 2007-10-18.23:26:24
SpamBayes Score 0.007610838
Marked as misclassified No
Message-id <1192749985.07.0.719728900575.issue1301@psf.upfronthosting.co.za>
In-reply-to
Content
The following fails with python 2.5 as built by Fedora 7:

t2.py:
import sys, Tkinter
Tkinter.Button(text=u"").pack( )
Tkinter.mainloop( )

$ python t2.py
python: ./Modules/_tkinter.c:941: AsObj: Assertion `size < size *
sizeof(Tcl_UniChar)' failed.
Aborted

The following patch corrects the problem:

--- Python-2.5-fc7/Modules/_tkinter.c   2006-08-11 22:33:36.000000000 -0400
+++ Python-2.5/Modules/_tkinter.c       2007-10-18 18:44:40.000000000 -0400
@@ -938,7 +938,7 @@
 #if defined(Py_UNICODE_WIDE) && TCL_UTF_MAX == 3
                Tcl_UniChar *outbuf;
                Py_ssize_t i;
-               assert(size < size * sizeof(Tcl_UniChar));
+               assert(size == 0 || size < size * sizeof(Tcl_UniChar));
                outbuf = (Tcl_UniChar*)ckalloc(size * sizeof(Tcl_UniChar));
                if (!outbuf) {
                        PyErr_NoMemory();
History
Date User Action Args
2007-10-18 23:26:25thyrsussetspambayes_score: 0.00761084 -> 0.007610838
recipients: + thyrsus
2007-10-18 23:26:25thyrsussetspambayes_score: 0.00761084 -> 0.00761084
messageid: <1192749985.07.0.719728900575.issue1301@psf.upfronthosting.co.za>
2007-10-18 23:26:24thyrsuslinkissue1301 messages
2007-10-18 23:26:24thyrsuscreate