New submission from STINNER Victor <[EMAIL PROTECTED]>:
_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).
----------
components: Library (Lib)
files: weakref_init.patch
keywords: patch
messages: 71662
nosy: haypo
severity: normal
status: open
title: invalid result value of _weakref.__init__()
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11195/weakref_init.patch
_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3634>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com