On 22.07.13 16:38, Patrick Strawderman wrote:
On Jul 20, 2013, at 11:27 PM, Christian Tismer <tis...@stackless.com> wrote:

- BTrees has a serious bug, see the following example:

from BTrees import OOBTree as BT
t = BT.BTree()
for num in range(100):
...   k = str(num)
...   t[k] = k
t._firstbucket._next = None
Bus error: 10
(tmp)minimax:doc tismer$
So there is either an omission to make t._next() read-only, or a check
of its validity is missing.
Maybe you could open an issue on Github?

Yes I can do that (and fix it).

I was just telling it here because I'd like to know how it is meant to

- should the attributes be exposed at all? (I guess yes)

- are they meant to be writable? (probably not, although that is handy :)

I would actually like to be able to derive from Bucket and implement
copy-on-write semantics for FrozenBTree (not yet existing) without
re-coding much in C, this was the reason while I played around here.

For that purpose (sharing buckets) I need a way to make the _next
pointers indirect.

cheers - chris

Christian Tismer             :^)   <mailto:tis...@stackless.com>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to