Hi PyPy-dev! I spent the last two days hunting refcounting problems with pypy generated extension modules.
After infinitely long staring at the final flow graphs, I found out that our transition to the gctransform is not as complete as I assumed. Impossible too find by flow graphs, because we are still chiming extra increfs in from the backend, see funcgen.py . I tried to solve this by disabling all the extra increfs, but this doesn't work, yet. Something else must be adjusted. The problem is an inconsistency about how getattr is handled. The code in funcgen.py always adds an incref when we access a field or array item of a PyObject. In gctransformation.py, there are deallocators created, which produce code like v_xxx = obj.xxx pop_alive(v_xxx) but this doesn't work for PyOnject, since funcget.py adds an extra ref, and the object stays as alive as it was before. I hoped to solve this, assuming that our gc code is generic enough to get this right for PyObject as well. Maybe I'm missing something, have to give up. I'm probably anyway interfering with other people's work. -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
