[Bug 1070772] Re: modelview_test.py segfaults python
Julian Taylor
jtaylor.debian at googlemail.com
Sat Feb 23 11:34:14 UTC 2013
it segfaults for all pythons now, including the -dbg versions.
the problematic code part looks pretty broken:
...
Py_DECREF((PyObject*)self);
}
//Python Object is not destroyed yet
if (cppData && Shiboken::BindingManager::instance().hasWrapper(cppData)) {
self->d->hasOwnership = false;
// the cpp object instance was deleted
delete[] self->d->cptr;
self->d->cptr = 0;
}
...
it decrefs self to zero and then dereferences members again, before a certain commit the comment:
// After this point the object can be death do not use the self pointer bellow
was below the decref instead of at the end of the function, so this code is very likely broken.
unfortunately this is not even the cause of the crash, it already
crashes on the decref above, exchanging the order of the code segments
does not fix it.
commenting the decref (introducing a memleak) fixes python2 but python 3 still fails:
70 - sample_duck_punching (SEGFAULT)
150 - sample_static_nonstatic_methods (SEGFAULT)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python2.7 in Ubuntu.
https://bugs.launchpad.net/bugs/1070772
Title:
modelview_test.py segfaults python
Status in “python2.7” package in Ubuntu:
New
Status in “python3.2” package in Ubuntu:
New
Status in “shiboken” package in Ubuntu:
Confirmed
Bug description:
python2.7, 3.2 and 3.3. Quantal and Raring.
# cleanup ints: 22 unfreed ints
# <int at 0x1c139f0, refcnt=1, val=65536>
# <int at 0x1c13a08, refcnt=1, val=640>
# <int at 0x1ba4848, refcnt=1, val=590923713>
# <int at 0x1ba4860, refcnt=1, val=907133923>
# <int at 0x1ba4878, refcnt=1, val=69069>
# <int at 0x1ba4890, refcnt=1, val=3644798167>
# <int at 0x1ba48a8, refcnt=1, val=89869747>
# <int at 0x1ba48c0, refcnt=1, val=1927868237>
# <int at 0x1b52540, refcnt=2, val=30>
# <int at 0x1b525e8, refcnt=2, val=23>
# <int at 0x1b52690, refcnt=5, val=16>
# <int at 0x1b52708, refcnt=3, val=11>
# <int at 0x1b52720, refcnt=5, val=10>
# <int at 0x1b52738, refcnt=4, val=9>
# <int at 0x1b52750, refcnt=3, val=8>
# <int at 0x1b52768, refcnt=4, val=7>
# <int at 0x1b52798, refcnt=5, val=5>
# <int at 0x1b527c8, refcnt=12, val=3>
# <int at 0x1b527e0, refcnt=20, val=2>
# <int at 0x1b527f8, refcnt=41, val=1>
# <int at 0x1b52810, refcnt=67, val=0>
# <int at 0x1b52828, refcnt=9, val=-1>
# cleanup floats
Segmentation fault (core dumped)
Reported upstream at https://bugreports.qt-
project.org/browse/PYSIDE-121
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1070772/+subscriptions
More information about the foundations-bugs
mailing list