Python 2.2 __slots__ Bug?

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Jun 26 11:23:45 EDT 2002


From: Jonathan Hogg <jonathan at onegoodidea.com>
Subject: Re: Python 2.2 __slots__ Bug?
Date: Wed, 26 Jun 2002 14:00:48 +0100

> On 26/6/2002 12:03, in article
> mailman.1025089474.17780.python-list at python.org, "Glyph Lefkowitz"
> <glyph at twistedmatrix.com> wrote:
> 
> > I get "I'm fine" and then a segmentation fault.  This only happens when
> > __slots__ is defined on a new-style class.  Seriously, i'm not making those
> > numbers up -- reliably, 43551 objects will crash the interpreter; fewer will
> > not.
> 
> Interestingly I get the construction working fine, but the 'del' crashes the
> interpreter with (on Mac OS X):

Hmm.  Sprinkling print statements about shows it dying on the 'del' (this is
how I encountered the bug originally, I was trying to time the [de]allocation
of large numbers of objects under 2.1 vs. 2.2), but the stacktrace is still the
same; is there some difference between the way allocation works on OS X
vs. Linux? (I assume if you can run OS X we're using the same hardware.)

> This seems to fail for me at 5430 objects. I couldn't get the allocation to
> crash at all (or at least up to a million objects, after which I got bored).

Yep, same here.  Allocation is no problem.

-- 
 |    <`'>    |  Glyph Lefkowitz: Traveling Sorcerer   |
 |   < _/ >   |  Lead Developer,  the Twisted project  |
 |  < ___/ >  |      http://www.twistedmatrix.com      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20020626/4b92d813/attachment.sig>


More information about the Python-list mailing list