mirror of
https://github.com/python/cpython.git
synced 2026-11-09 06:00:54 +08:00
When a SQL parameter sequence is an exact list, sqlite3 retrieved an element as a borrowed reference before taking ownership. On free-threaded builds another thread can replace it in between, so binding can use a freed object and crash. Fetch a strong reference atomically. Backport to 3.15 and 3.14.
(cherry picked from commit 4df47d8e60)
Co-authored-by: Jelle Zijlstra <[email protected]>