[Patches] [ python-Patches-1297028 ] cjkcodecs does not initialize type pointer
SourceForge.net
noreply at sourceforge.net
Wed Sep 21 08:46:27 CEST 2005
Patches item #1297028, was opened at 2005-09-20 16:25
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1297028&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: Python 2.4
Status: Open
Resolution: None
>Priority: 9
Submitted By: Eric Huss (ehuss)
>Assigned to: Anthony Baxter (anthonybaxter)
Summary: cjkcodecs does not initialize type pointer
Initial Comment:
The cjkcodecs code does not initialize the ob_type
pointer for the 3 type objects it defines.
The following code will illustrate a segmentation fault:
>>> import _codecs_cn
>>> c = _codecs_cn.getcodec('gb2312')
>>> type(c)
Segmentation fault (core dumped)
I have attached a patch which should solve the problem.
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-09-20 23:46
Message:
Logged In: YES
user_id=33168
Thanks!
Checked in as:
* Misc/NEWS 1.1374
* Modules/cjkcodecs/multibytecodec.c 1.4
This needs to be backported. Anthony is the branch still
frozen? Feel free to backport this.
I tried to create a test, but it didn't crash. If someone
can write a test that crashes when running under
regrtest.py, that would be great.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1297028&group_id=5470
More information about the Patches
mailing list