New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chained __slots__ dealloc segfault #36802
Comments
With the following script ('foo.py'): ----- class foo1(object):
def __init__(self, n):
self.n = n
class foo2(object):
def __init__(self, n):
self.n = n
__slots__ = ['n']
o = None
for i in xrange(50000):
o = foo1(o)
print 'alloc OK'
del o
print 'dealloc OK'
o = None
for i in xrange(50000):
o = foo2(o)
print 'alloc OK'
del o
print 'OK' Running this results in a segmentation fault in the ----- A gdb stack trace shows: ----- The number of objects that can be deallocated depends This is on a Mac OS X 10.1.5 system, but was originally |
Logged In: YES I do not get this problem with current CVS. |
Logged In: YES Neal, it's odd that you can't provoke a problem. Try Assigned to Guido just because he'll enjoy it <wink>. |
Logged In: YES I bumped MAX up to 500000 and 2.3 didn't crash. |
Logged In: YES I've uploaded a patch (against HEAD today) that fixes this [ 575073 ] PyTRASHCAN slots deallocation |
Logged In: YES I updated my original patch (575073) to match recent changes |
Logged In: YES Tim can review this better, since AFAIK he rewrote the |
Logged In: YES Back to Guido, since he's looking at this now. |
Logged In: YES Fixed in CVS. Now, what to do about 2.2? The problem still |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: