Message71001
This is a bug in the C implementation of pickle (i.e., the _pickle
module). I think you're right about the missing exception check. At
first glance, it looks like the missing else-if case for "setstate ==
NULL", in load_build(), is the cause of the problem:
static int
load_build(UnpicklerObject *self)
{
...
setstate = PyObject_GetAttrString(inst, "__setstate__");
if (setstate == NULL && PyErr_ExceptionMatches(PyExc_AttributeError)) {
PyErr_Clear();
}
/*---missing else-if case---------
else if (setstate == NULL) {
return NULL;
}
----------------------------------*/
else {
PyObject *result;
/* The explicit __setstate__ is responsible for everything. */
result = unpickler_call(self, setstate, state);
Py_DECREF(setstate);
if (result == NULL)
return -1;
Py_DECREF(result);
return 0;
}
... |
|
Date |
User |
Action |
Args |
2008-08-11 05:48:48 | alexandre.vassalotti | set | recipients:
+ alexandre.vassalotti, gvanrossum, idadesub, erickt |
2008-08-11 05:48:48 | alexandre.vassalotti | set | messageid: <1218433728.34.0.0938914299848.issue3514@psf.upfronthosting.co.za> |
2008-08-11 05:48:47 | alexandre.vassalotti | link | issue3514 messages |
2008-08-11 05:48:46 | alexandre.vassalotti | create | |
|