Hi,
I can reproduce your segfault on CPython too, so the problem is not
PyPy. The problem is a keepalive issue. CPython crashes consistently
on a line like this:
print gmpy_cffi.mpc(1.5, 2.3).real
I guess it's because the .real returns a reference inside the data
managed by the mpc object, but it is deallocated while the .real
object is still alive, which ends up in a crash. With CPython, you
can find it reliably by compiling _cffi_backend with -DCFFI_MEM_DEBUG
before running the tests. (I guess that it is a trick that should be
mentioned on the doc page...)
A bientôt,
Armin.
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue