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 alexandre.vassalotti
Recipients alexandre.vassalotti, erickt, gvanrossum, idadesub
Date 2008-08-11.05:48:46
SpamBayes Score 6.4834134e-09
Marked as misclassified No
Message-id <1218433728.34.0.0938914299848.issue3514@psf.upfronthosting.co.za>
In-reply-to
Content
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;
    }
...
History
Date User Action Args
2008-08-11 05:48:48alexandre.vassalottisetrecipients: + alexandre.vassalotti, gvanrossum, idadesub, erickt
2008-08-11 05:48:48alexandre.vassalottisetmessageid: <1218433728.34.0.0938914299848.issue3514@psf.upfronthosting.co.za>
2008-08-11 05:48:47alexandre.vassalottilinkissue3514 messages
2008-08-11 05:48:46alexandre.vassalotticreate