Files
cpython/Modules/_sqlite
Jelle Zijlstra 656af533dc gh-159739: Keep sqlite3 cursor metadata and factories valid during queries (#160403)
A cursor exposed its description tuple before filling in all the columns, so an allocation failure or a reader on a free-threaded build could encounter an unset tuple entry. An allocation failure could also clear lastrowid and crash the next execute. Build new metadata before replacing the old values and synchronize reads and writes. Keep a strong reference to each row or text factory while it is called so replacing the factory during a fetch cannot destroy an active callable.
2026-10-24 13:46:15 -07:00
..