FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-159811: Raise OpenSSL errors in `_hashlib.HASH` after re-attaching the thread state (GH-159817) by miss-islington · Pull Request #159927 · python/cpython · GitHub

Repository navigation

[3.15] gh-159811: Raise OpenSSL errors in _hashlib.HASH after re-attaching the thread state (GH-159817) - #159927

Merged
picnixz merged 1 commit into
python:3.15from
miss-islington:backport-6fa2d64-3.15
Oct 20, 2026
Merged

picnixz merged 1 commit into
python:3.15from
miss-islington:backport-6fa2d64-3.15

Conversation

miss-islington commented Oct 20, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

When EVP_DigestUpdate() failed, _hashlib_HASH_hash() raised a Python
exception, however, _hashlib.HASH.update() and the _hashlib.HASH
constructor release the GIL before calling it when the data is larger
than HASHLIB_GIL_MINSIZE bytes.

_hashlib_HASH_hash() now only returns an error status and its callers
raise the exception once they have re-attached the thread state.
(cherry picked from commit 6fa2d64)

Co-authored-by: Bénédikt Tran 10796600+picnixz@users.noreply.github.com

…aching the thread state (pythonGH-159817)

When `EVP_DigestUpdate()` failed, `_hashlib_HASH_hash()` raised a Python
exception, however, `_hashlib.HASH.update()` and the `_hashlib.HASH`
constructor release the GIL before calling it when the data is larger
than `HASHLIB_GIL_MINSIZE` bytes.

`_hashlib_HASH_hash()` now only returns an error status and its callers
raise the exception once they have re-attached the thread state.
(cherry picked from commit 6fa2d64)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
github-project-automation Bot moved this from Todo to In Progress in Sprint Oct 20, 2026
picnixz merged commit 0405f10 into python:3.15 Oct 20, 2026
62 checks passed
miss-islington deleted the backport-6fa2d64-3.15 branch October 20, 2026 19:47
github-project-automation Bot moved this from In Progress to Done in Sprint Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL