
Hi everyone, I think I might have found a bug in the PyPy C-API. It seems that PyType_Type.tp_new is broken. Here is a minimal example that reproduces the bug. Instructions: Compile Foo3.c as a python extension module named Foo3. Set up the paths so that Test3.py can find Foo3. Run Test3.py Expected result and observed result with CPython 2.7.6: Test3.py runs Observed result with PyPy 2.2.1: Test3.py crashes. (It gets into an infinite recursive loop where PyType_Type.tpnew and Foo3Type_Type.tp_new keep calling each other.) Fixing this bug, or finding a workaround, would get me one step closer to getting PySide to run with PyPy. Cheers, Johan

Hi Johan, On 8 March 2014 14:42, Johan Råde <johan.rade@gmail.com> wrote:
I think I might have found a bug in the PyPy C-API. It seems that PyType_Type.tp_new is broken.
Indeed. I tried to look, but either I missed something or it looks like it won't be that obvious to fix. For reference, the built-in types like PyType_Type are generated automatically and all their slots (or maybe only tp_new?) seem to be subtly wrong: they are done with slot_tp_new(), which calls the instance's generic operation; the latter is possibly overridden in a subtype, thus leading to infinite recursion in cases like you report. Can you post this to the bug tracker? Otherwise it will likely be forgotten. A bientôt, Armin.
participants (2)
-
Armin Rigo
-
Johan Råde