[issue9756] Crash with custom __getattribute__

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: > Ok, I'm sure that I have hardware issues, but I am also sure that the > patch introduces random crashes, especially in > test_descr.test_wrapper_segfault(). Forget my last messages: my Ubuntu box has serious memory issues. memtest86+ found 41 errors. -- I

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0db11682ea45 by Victor Stinner in branch '3.1': Issue #9756: credit the author, Andreas Stührk (Trundle) http://hg.python.org/cpython/rev/0db11682ea45 New changeset a17f5c787cc0 by Victor Stinner in branch '3.2': (Merge 3.1) Issue #9756: credit the

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 109687cc2c1e by Victor Stinner in branch '2.7': (Merge 3.1) Issue #9756: When calling a method descriptor or a slot wrapper http://hg.python.org/cpython/rev/109687cc2c1e -- ___ Python tracker

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset c5e6f997730e by Victor Stinner in branch '3.1': Issue #9756: When calling a method descriptor or a slot wrapper descriptor, the http://hg.python.org/cpython/rev/c5e6f997730e New changeset 4fc04f6a0731 by Victor Stinner in branch '3.2': (Merge 3.1)

[issue9756] Crash with custom __getattribute__

2011-05-01 Thread STINNER Victor
STINNER Victor added the comment: Le dimanche 01 mai 2011 à 03:19 +, STINNER Victor a écrit : > The test suite crashs randomly with issue9756.patch on my Ubuntu 11.04 > (AMD64 with 4 cores, 4 GB of memory, Linux 2.6.38). I use "./python > -bb Lib/test/regrtest.py -r" to reproduce the crash.

[issue9756] Crash with custom __getattribute__

2011-04-30 Thread STINNER Victor
STINNER Victor added the comment: Oh, the Ubuntu host has a temperature issue and hardware errors... Example of mcelog output: MCE 0 CPU 0 THERMAL EVENT TSC 198d1eb8325 TIME 1304222195 Sun May 1 05:56:35 2011 Processor 0 heated above trip temperature. Throttlin

[issue9756] Crash with custom __getattribute__

2011-04-30 Thread STINNER Victor
STINNER Victor added the comment: The test suite crashs randomly with issue9756.patch on my Ubuntu 11.04 (AMD64 with 4 cores, 4 GB of memory, Linux 2.6.38). I use "./python -bb Lib/test/regrtest.py -r" to reproduce the crash. ... I tried without the patch, and test_descr does crash quickly in

[issue9756] Crash with custom __getattribute__

2011-04-29 Thread Andreas Stührk
Andreas Stührk added the comment: I think it is reasonable to restrict the self argument of method descriptors and slot wrapper descriptors to real instances of the type. The called method can't cope with the value anyway (in the general case). Alternative Python implementations like Jython a

[issue9756] Crash with custom __getattribute__

2011-02-04 Thread Andreas Stührk
Andreas Stührk added the comment: See also issue #10922. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue9756] Crash with custom __getattribute__

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is a somewhat more straightforward way to reproduce the problem: >>> class X: ...__class__ = int ... [55910 refs] >>> isinstance(X(), int) True [55914 refs] >>> int.bit_length(X()) Assertion failed: (PyLong_Check(v)), function long_bit_length, f

[issue9756] Crash with custom __getattribute__

2010-09-15 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue9756] Crash with custom __getattribute__

2010-09-11 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo versions: -Python 2.5, Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue9756] Crash with custom __getattribute__

2010-09-05 Thread Meador Inge
Meador Inge added the comment: > To fix the segfault, I suppose that we use a more strict validation on > the input type. Eg. Use PyUnicode_Check() instead of > PyObject_IsInstance()? Where would the more strict validation take place? This problem is not unique to Unicode objects: motherbr

[issue9756] Crash with custom __getattribute__

2010-09-03 Thread STINNER Victor
STINNER Victor added the comment: I have different questions: - Should we trust PyObject_IsInstance() or PyUnicode_Check() (because they give different results)? - Should PyObject_IsInstance() and PyUnicode_Check() give the same result? - Should we fix the segfault? To fix the segfault, I s

[issue9756] Crash with custom __getattribute__

2010-09-03 Thread STINNER Victor
STINNER Victor added the comment: PyUnicode_Check(op) checks op->ob_type->tp_flags & Py_TPFLAGS_UNICODE_SUBCLASS. -- ___ Python tracker ___ __

[issue9756] Crash with custom __getattribute__

2010-09-03 Thread STINNER Victor
STINNER Victor added the comment: >>> class Spam(object): ... def __getattribute__(self, name): ... if name == '__class__': ... return str ... raise AttributeError ... >>> spam = Spam('spam') >>> isinstance(spam, str) True isinstance(spam, str) calls str.__insta

[issue9756] Crash with custom __getattribute__

2010-09-03 Thread STINNER Victor
STINNER Victor added the comment: << I found this crash while playing with proxies (thanks haypo). http://code.activestate.com/recipes/496741-object-proxying/ >> My question was: why does isinstance(Proxy('abc'), str) works (give True), whereas re.match('abc', Proxy('abc')) fail. It looks lik

[issue9756] Crash with custom __getattribute__

2010-09-03 Thread Andreas Stührk
Andreas Stührk added the comment: At least two tests in `test.test_descr` consider that behaviour as a feature: "test_isinst_isclass" and "test_proxy_super". -- ___ Python tracker _

[issue9756] Crash with custom __getattribute__

2010-09-03 Thread Andreas Stührk
Andreas Stührk added the comment: It's because you can fool `PyObject_IsInstance()` that way: >>> class Spam(object): ... def __getattribute__(self, name): ... if name == '__class__': ... return str ... raise AttributeError ... >>> isinstance(Spam(), str) True

[issue9756] Crash with custom __getattribute__

2010-09-03 Thread Florent Xicluna
New submission from Florent Xicluna : I found this crash while playing with proxies (thanks haypo). http://code.activestate.com/recipes/496741-object-proxying/ class MyClass(object): def __init__(self): self.pwn = None def __getattribute__(self, name): print('MyClass._