[issue9756] Crash with custom __getattribute__

STINNER Victor report at bugs.python.org
Sun May 1 15:09:08 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Le dimanche 01 mai 2011 à 03:19 +0000, 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.
> 
> ... I tried without the patch, and test_descr does crash quickly in
> test_wrapper_segfault(). It crashs in _PyObject_GC_New(), in a
> callback used to release the memory. Sometimes it fails on
> update_refs(), sometimes in _PyObject_DebugFree(), sometimes in
> wrapper_dealloc()->_Py_ForgetReference, etc. I use "./python
> Lib/test/regrtest.py -F -v test_descr" to reproduce the crash
> (sometimes it takes more than one run to crash).
> 
> It's strange because I'm unable to reproduce the bug on a very similar
> setup (Debian Sid, AMD64 with 2 cores, 2 GB of memory, Linux 2.6.38).
> 
> Should I run a memcheck on the Ubuntu host? Or is anyone able to
> reproduce the bug?

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().

I tried to only patch methoddescr_call(): replace PyObject_IsInstance()
by _PyObject_RealIsSubclass() introduces the crash. Call
PyObject_IsInstance() after _PyObject_RealIsSubclass() doesn't help.
But... call PyObject_IsInstance() before _PyObject_RealIsSubclass()
avoids the crash !?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9756>
_______________________________________


More information about the Python-bugs-list mailing list