| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Use the existing memcpy fallback for C++ and test array items, references, single evaluation and concrete object pointers. AI assistance: ChatGPT assisted with implementation and validation. The regression and fallback approach follow the issue discussion.
Sorry, something went wrong.
…ment Address Victor Stinner review: mention the tested macros in the source comment above test_refcount_lvalues().
|
The AI is not just an assistance.It is writjng everything. I am not considering this a human PR enough and this does exceed the realm of acceptable use. |
Sorry, something went wrong.
That is not true but your call |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #157649.
Use the existing memcpy() implementations of Py_CLEAR, Py_SETREF and Py_XSETREF for C++, as suggested in the issue discussion. decltype() can bind their temporary to an array element or reference, so overwriting the destination decrements the wrong pointer. The C paths are unchanged.
The C++ regression exercises all three macros with array elements, references, NULL destinations, single evaluation and concrete object pointers. Py_CLEAR() also runs in the limited-API build. Thanks to Lucas Colley for the report/bisection and Victor Stinner for the fallback approach.
Validation
Original before/after run, Ubuntu x86-64, GCC/g++ 13.3, debug CPython 3.16 built from 8542958:
That fork run covered only the extension suites. Subsequently, upstream Tests run 35367131812 completed successfully on head a66a922; lint and label checks also pass. The follow-up commit changes only the requested source comment. No NumPy rebuild is claimed.
AI assistance: ChatGPT assisted with implementation and validation.