[Pyrex] pyrex 0.9.4.1 bugs?

Chris Bainbridge chris.bainbridge at gmail.com
Wed Aug 16 23:30:10 UTC 2006


On 15/08/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Chris Bainbridge wrote:
> > I've looked over the archives at
> > noticed that a segfault generating bug was reported in May (thread
> > "Bug report on return inside a loop"). Did this ever get fixed?
>
> I fixed one bug like that, but I think there may
> be another one on my list that I haven't had a chance
> to investigate yet.

I found a few problems with ode destroying objects underneath pyode
and after fixing them I can't reproduce the errors I saw, so I don't
think the problem was actually with pyrex. I did notice that if I do
something like:

cdef class World:
    def __new__(self):
        self.objectlist = []

    def __dealloc__(self):
        if self.objectlist:
            for o in self.objectlist:
                o._destroyed()

It compiles fine, but I get bad reads reported by valgrind at runtime.
If I do the objectlist init in the __init__ function rather than
__new__ then everything is fine. Is this supposed to happen, and if so
what is the reason?

Thanks,
Chris



More information about the Pyrex mailing list