Re: zope-tests - FAILED: 9, OK: 72

Hanno Schlichting <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
On Sun, Jun 5, 2011 at 8:24 PM, Hanno Schlichting <[email protected]> wrote:
> $ bin/alltests -s Acquisition -t test_mixed_explicit_and_explicit
> Running zope.testrunner.layer.UnitTests tests:
>  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
> Segmentation fault
>
> I haven't yet tried to debug the problem itself.

I took the time to investigate this. It came down to the same issue
noted in https://bugs.launchpad.net/bugs/675064. Some code treated a C
int as a pointer. Apparently on most platforms sizeof(int) ==
sizeof(pointer), but there's some where that's not the case.

In this particular case it was a simple mistake of using the wrong variable:

PyObject *expl=0;
int explicit=1;

UNLESS (PyArg_ParseTupleAndKeywords(
     args, kw, "O|OOOOi", acquire_args+1,
     &name, &filter, &extra, &explicit, &defalt, &containment
     ))
return NULL;

if (expl) explicit=PyObject_IsTrue(expl);

The fix was to pass &expl instead of &explicit into
PyArg_ParseTupleAndKeywords. Almost the same code existed in
Wrapper_acquire_method and module_aq_acquire and only
Wrapper_acquire_method got it wrong.

I released a new Acquisition version and put it into Zope 2.x.
Hopefully the buildbots will finally get green again.

Hanno
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.