]> git.notmuchmail.org Git - notmuch/commit
fix segfaults in Python cFFI API and add tests
authorLars Kotthoff <lars@larsko.org>
Thu, 6 Feb 2025 02:52:51 +0000 (19:52 -0700)
committerDavid Bremner <david@tethera.net>
Fri, 7 Feb 2025 16:13:16 +0000 (12:13 -0400)
commit9c1f6cf746725af7bbbb66e746c5d694723ac0eb
treef3c1b7b0fc87fa2970bddadb1f9efedf2102bee0
parent409ad6b2a897c1571044bf6e4021a35fbd85b122
fix segfaults in Python cFFI API and add tests

Several iterators in the Python cFFI API destroyed the objects they iterated
over too early (when the iterator was exhausted), causing subsequent segfaults
in common cases like creating a list from the iterator. This patch fixes the
segfaults and add tests to ensure that they don't happen again.
bindings/python-cffi/notmuch2/_base.py
bindings/python-cffi/notmuch2/_message.py
bindings/python-cffi/notmuch2/_query.py
bindings/python-cffi/tests/test_database.py
bindings/python-cffi/tests/test_message.py