Repository navigation
Commit b4b81e1
authored
`hashlib_openssl_HMAC_update_once()` set an exception when the OpenSSL
HMAC update function failed, but it was called inside a GIL-released
region and the object's mutex held by `_hashlib.HMAC.update()` and
`_hashlib.hmac_new()` when the data exceeds `HASHLIB_GIL_MINSIZE` bytes.
Instead, the HMAC update function is called directly in `_hmac_update()`,
and the exception is set once the thread state is re-attached and the mutex
is released (restores the behavior prior to gh-134531).
Since the OpenSSL error queue is per thread, the exception type and message
are unaffected.
1 parent 6f439ee commit b4b81e1
2 files changed
Lines changed: 10 additions & 12 deletions
File tree
- Misc/NEWS.d/next/Library
- Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1976 | 1976 | | |
1977 | 1977 | | |
1978 | 1978 | | |
1979 | | - | |
1980 | | - | |
1981 | | - | |
1982 | | - | |
1983 | | - | |
1984 | | - | |
1985 | | - | |
1986 | | - | |
1987 | | - | |
1988 | | - | |
1989 | 1979 | | |
1990 | 1980 | | |
1991 | 1981 | | |
| |||
2240 | 2230 | | |
2241 | 2231 | | |
2242 | 2232 | | |
2243 | | - | |
| 2233 | + | |
| 2234 | + | |
2244 | 2235 | | |
2245 | 2236 | | |
2246 | | - | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
2247 | 2242 | | |
2248 | 2243 | | |
2249 | 2244 | | |
| |||
0 commit comments