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.

Title: Use Py_XDECREF() instead of Py_DECREF() in MultibyteCodec and MultibyteStreamReader
Type: Stage:
Components: Library (Lib) Versions: Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, vstinner
Priority: normal Keywords: patch

Created on 2008-07-06 18:27 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
multibytecodec_py_xdecref.patch vstinner, 2008-07-06 18:27 Patch to fix described bugs
Messages (2)
msg69347 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-07-06 18:27
Functions mbstreamwriter_dealloc() and mbstreamreader_dealloc() of 
Modules/cjkcodecs/multibytecodec.c uses Py_DECREF() to free stream 
attribute memory, but this attribute may be NULL if MultibyteCodec or 
MultibyteStreamReader constructor fails.

Simple fix: use Py_XDECREF().

>>> import _multibytecodec
>>> _multibytecodec.MultibyteStreamReader(None)
Erreur de segmentation (core dumped)
msg69844 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-07-16 22:04
Fixed in r65038.
Date User Action Args
2022-04-11 14:56:36adminsetgithub: 47555
2008-07-16 22:04:28georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg69844
nosy: + georg.brandl
2008-07-06 18:27:39vstinnercreate