]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] gh-150374: Fix double release of import lock in lazy import reification (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 25 May 2026 09:36:22 +0000 (11:36 +0200)
committerGitHub <noreply@github.com>
Mon, 25 May 2026 09:36:22 +0000 (09:36 +0000)
gh-150374: Fix double release of import lock in lazy import reification (GH-150376)
(cherry picked from commit 5498eba545e950c7550c924f2e458c740a689c69)

Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst [new file with mode: 0644]
Python/import.c

diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-05-25-16-00-22.gh-issue-150374.Emu6d8.rst
new file mode 100644 (file)
index 0000000..7189ca1
--- /dev/null
@@ -0,0 +1 @@
+Fix double release of the import lock on lazy import reification errors.
index aa4ee660fa75da262f42ba068b2e25c5c5acd3c5..fc1b3f1acbe0634ae6f51251a663854718fb5b4f 100644 (file)
@@ -3934,7 +3934,6 @@ _PyImport_LoadLazyImportTstate(PyThreadState *tstate, PyObject *lazy_import)
         return NULL;
     }
     else if (PySet_Add(importing, lazy_import) < 0) {
-        _PyImport_ReleaseLock(interp);
         goto error;
     }