-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-28503: Use crypt_r() when available instead of crypt() #11373
Conversation
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
GH-11376 is a backport of this pull request to the 3.7 branch. |
…11373) Use crypt_r() when available instead of crypt() in the crypt module. As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer. (cherry picked from commit 387512c) Co-authored-by: Gregory P. Smith <greg@krypto.org>
…GH-11376) Use crypt_r() when available instead of crypt() in the crypt module. As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer. (cherry picked from commit 387512c) Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
…11373) Use crypt_r() when available instead of crypt() in the crypt module. As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer.
Unless I'm mistaken, this will add |
if you can demonstrate a problem, feel free to open a new bugs.python.org issue for it. |
Use the
crypt_r
library function instead ofcrypt
when available (currently Linux and FreeBSD) to avoid using static shared libc data structures.Motivation: This fixes a memory sanitizer failure due to it not understanding libc crypt()'s preallocated space.
We could release the GIL around the
crypt_r
call, but it is such a fast function anyways that seems rather silly. Do that in a followup PR if desired.https://bugs.python.org/issue28503