commit | 8287aadb75f6bd0154996424819334cd3839707c | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Sun Oct 11 16:51:07 2020 +0300 |
committer | GitHub <noreply@github.com> | Sun Oct 11 16:51:07 2020 +0300 |
tree | a8c1bdba620f33bd02e9558fe2a8bae6df69d37b | |
parent | fa1d83db62a545580d9a1a585b2c1fb55961a5c3 [diff] |
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().