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 vstinner
Recipients vstinner
Date 2008-08-21.17:25:00
SpamBayes Score 2.7475704e-07
Marked as misclassified No
Message-id <1219339501.95.0.782408070152.issue3634@psf.upfronthosting.co.za>
In-reply-to
Content
_weakref.__init__() doesn't catch errors correctly. Example:
--------------------- 8< -------------------------
from gc import collect
import _weakref

class FuzzingUserClass:
    pass

obj = _weakref.ref(FuzzingUserClass)

# Exception not raised??
obj.__init__(
    0,
    0,
    0,
)

# Exception catched here??
collect()
--------------------- 8< -------------------------

Attached patch fix the bug for py3k branch: return -1 on error 
(instead of 1).
History
Date User Action Args
2008-08-21 17:25:01vstinnersetrecipients: + vstinner
2008-08-21 17:25:01vstinnersetmessageid: <1219339501.95.0.782408070152.issue3634@psf.upfronthosting.co.za>
2008-08-21 17:25:00vstinnerlinkissue3634 messages
2008-08-21 17:25:00vstinnercreate