Closed 0x2b3bfa0 closed 6 months ago
Thanks @0x2b3bfa0 ; could you add a unit test?
@jdavid, done!
Note for others: we've been running the following commands on our production containers for a month, while waiting for the next pygit2
release, and they work like a charm.
apt install --yes cmake
curl --location https://github.com/libssh2/libssh2/archive/refs/tags/libssh2-1.11.0.tar.gz | tar --extract --gzip
cmake -S libssh2-* -B libssh2-* && cmake --build libssh2-* --target install && rm --recursive libssh2-*
curl --location https://github.com/libgit2/libgit2/archive/refs/tags/v1.7.1.tar.gz | tar --extract --gzip
cmake -S libgit2-* -B libgit2-* -D USE_SSH=ON && cmake --build libgit2-* --target install && rm --recursive libgit2-*
ldconfig
pip install --force-reinstall git+https://github.com/libgit2/pygit2.git@5cabcfe08b58036f90e6da5761c9b19fdb3cbc6b
All the calls to
pygit2_filter_payload_free
need the GIL to callPy_DECREF
on thepygit2_filter_payload
objects, but thefilter.cleanup
callback was missingPyGILState_Ensure
and causing a crash.https://github.com/libgit2/pygit2/blob/8da921b4c2a6f8e64ad91e6395c0f3720df90083/src/pygit2.c#L322
https://github.com/libgit2/pygit2/blob/8da921b4c2a6f8e64ad91e6395c0f3720df90083/src/filter.c#L541-L546
https://github.com/libgit2/pygit2/blob/8da921b4c2a6f8e64ad91e6395c0f3720df90083/src/filter.c#L222-L234
Minimal reproducible example
Stack trace
(Closes iterative/studio#8623)