[issue2603] Make range __eq__ work

Alexander Belopolsky report at bugs.python.org
Thu Apr 10 00:12:24 CEST 2008


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

Actually, the patch contains an exploitable bug:

$ cat x.py
class X(int):
    def __eq__(self, other):
        raise ValueError

x = range(X(1),X(10),X(1))
x == x

$ ./python x.py
Segmentation fault (core dumped)

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2603>
__________________________________


More information about the Python-bugs-list mailing list