]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-41993: Fix possible issues in remove_module() (GH-22631)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 11 Oct 2020 13:51:07 +0000 (16:51 +0300)
committerGitHub <noreply@github.com>
Sun, 11 Oct 2020 13:51:07 +0000 (16:51 +0300)
commit8287aadb75f6bd0154996424819334cd3839707c
treea8c1bdba620f33bd02e9558fe2a8bae6df69d37b
parentfa1d83db62a545580d9a1a585b2c1fb55961a5c3
bpo-41993: Fix possible issues in remove_module() (GH-22631)

* PyMapping_HasKey() is not safe because it silences all exceptions and can return incorrect result.
* Informative exceptions from PyMapping_DelItem() are overridden with RuntimeError and
  the original exception raised before calling remove_module() is lost.
* There is a race condition between PyMapping_HasKey() and PyMapping_DelItem().
Misc/NEWS.d/next/Core and Builtins/2020-10-10-13-53-52.bpo-41993.YMzixQ.rst [new file with mode: 0644]
Python/import.c