[ZODB-Dev] [BTrees] potential bug in "_bucket__p_resolveConflict"

Tim Peters tim at zope.com
Mon Mar 29 22:02:28 EST 2004


[Dieter Maurer]
> This report is for the ZODB version included in Zope 2.7.0.
>
> I just got a SIGSEGV from "BTrees/BucketTemplate.c:1281".
>
> The code there is "Py_DECREF(r);" "r" is "NULL", because
> the "s" parameter passed to "_bucket__p_resolveConflict"
> contains 3 "None" objects.
>
> Almost surely, the "Py_DECREF" should be a "Py_XDECREF".

Yup!  It's unlikely that all three states are None, but possible, and the
code has always been like that (well, since I first saw it).

That bug doesn't exist on the HEAD, thanks to backporting
rewritten-for-clarity ZODB 4 code (_bucket__p_resolveConflict's logic in
ZODB 3 was too tortured to follow).  I think I'll just paste the HEAD's
version of this routine into the 2.7 branch.




More information about the ZODB-Dev mailing list