Victor Stinner

Results 709 comments of Victor Stinner

I created follow-up issues: * #99300 * #99481 * #99537

Py_SETREF(), Py_XSETREF() and Py_CLEAR() have been fixed in Python 3.12. By the way, Py_SETREF() and Py_XSETREF() are now documented: https://docs.python.org/dev/c-api/refcounting.html#c.Py_SETREF It was decided to **not** fix the bug in Python...

Thanks @hochl for your bug report.

> Looks like it caused https://github.com/python/cpython/issues/99701 Oh wow, I didn't notice that my commit c03e05c2e72f3ea5e797389e7d1042eef85ad37a can introduce a type punning issue and miscompile Python using strict aliasing (which is the...

I fixed again Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros with commit b11a384dc7471ffc16de4b86e8f5fdeef151f348. This time, the fix should **avoid the type punning issue which caused miscompilation** of Python. The fix uses ``__typeof__()``...

> File "C:\Workspace\buildarea\3.x.linaro-win-arm64\build\Lib\test\test_ast.py", line 1252 in test_recursion_direct I fixed the issue with commit cd67c1bb30eccd0c6fd1386405df225aed4c91a9. > Is it really related? Or just a coincedence? thinking Tests on recursive functions are fragile,...

I reopen the issue. The limited C API of Python 3.12 is still broken on compilers which don't provide ``typeof()``: Py_CLEAR() now requires ``memset()`` which is not provided by ````:...

Minimum extension module code reproducing the build error: ```c #define Py_LIMITED_API 0x030b0000 #include "Python.h" static int xx_modexec(PyObject *m) { PyObject *o = PyLong_FromLong(1); Py_CLEAR(o); return 0; } static PyModuleDef_Slot xx_slots[]...

I created a thread on discuss about this issue: https://discuss.python.org/t/c-api-design-goal-hide-implementation-details-convert-macros-to-regular-functions-avoid-memset-or-errno-in-header-files-etc/25137

> Is this issue still relevant after https://github.com/python/cpython/pull/106315? AFAICS, we can close this as outdated, no? I close the issue. While the history is complicated, the root stable ABI issue...