]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 30 Sep 2024 01:23:42 +0000 (03:23 +0200)
committerGitHub <noreply@github.com>
Mon, 30 Sep 2024 01:23:42 +0000 (18:23 -0700)
commit4c3d537531c63bb9fa8f972e721167f341131c05
tree5f9214ac66b8c7c27c490a2facf7477b980d8c1a
parent8b9bd43d40c2140797dd53449eeb5ca2779f4a54
[3.13] gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898) (#123936)

gh-77894: Fix a crash when the GC breaks a loop containing a memoryview (GH-123898)

Now a memoryview object can only be cleared if there are no buffers
that refer it.
(cherry picked from commit a1dbf2ea69acc6ccee6292709af1dadd55c068be)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/pickletester.py
Lib/test/test_memoryview.py
Misc/NEWS.d/next/Core_and_Builtins/2024-09-10-13-27-16.gh-issue-77894.ZC-Olu.rst [new file with mode: 0644]
Objects/memoryobject.c