Message240404
| Author |
chaselton |
| Recipients |
chaselton, ethan.furman, freakboy3742, r.david.murray, refi64 |
| Date |
2015年04月10日.00:53:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1428627201.08.0.618318885381.issue23496@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
FYI, I think this is the culprit.
In Python/pylifecycle.c:
static char*
get_codec_name(const char *encoding)
{
char *name_utf8, *name_str;
PyObject *codec, *name = NULL;
codec = _PyCodec_Lookup(encoding);
if (!codec)
goto error;
name = _PyObject_GetAttrId(codec, &PyId_name);
Py_CLEAR(codec);
if (!name)
goto error;
name_utf8 = _PyUnicode_AsString(name);
if (name_utf8 == NULL)
goto error;
name_str = _PyMem_RawStrdup(name_utf8);
Py_DECREF(name);
if (name_str == NULL) {
PyErr_NoMemory();
return NULL;
}
return name_str;
error:
Py_XDECREF(codec);
Py_XDECREF(name);
return NULL;
}
If I figure out a working patch I'll post it here |
|