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

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

Repository navigation

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

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

picnixz merged 1 commit into
python:3.14from
picnixz:backport-6fa2d64-3.14

Conversation

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

Copy link
Copy Markdown
Member

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)

… re-attaching 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>
picnixz requested a review from gpshead as a code owner October 20, 2026 18:09
bedevere-app Bot added the sprint label Oct 20, 2026
github-project-automation Bot moved this to Todo in Sprint Oct 20, 2026
picnixz merged commit 5eed22f into python:3.14 Oct 20, 2026
53 checks passed
github-project-automation Bot moved this from Todo to Done in Sprint Oct 20, 2026
picnixz deleted the backport-6fa2d64-3.14 branch October 20, 2026 19:46
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.

1 participant


Back | FazBrowse Home | New Git URL