[pypy-dev] Possibly a PyPy C-API bug

Armin Rigo arigo at tunes.org
Sun Mar 9 08:26:53 CET 2014

Hi Johan,

On 8 March 2014 14:42, Johan Råde <johan.rade at 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,


More information about the pypy-dev mailing list