-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-100795: avoid unexpected freeaddrinfo
after failed getaddrinfo
#101010
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
Conversation
…pes.guess_type (pythonGH-30229) (cherry picked from commit 5dd7ec5) Co-authored-by: Kumar Aditya <[email protected]>
) Co-authored-by: Zachary Ware <[email protected]>. Co-authored-by: Christian Heimes <[email protected]>. Co-authored-by: Christian Heimes <[email protected]>
…fix (pythonGH-31920) (cherry picked from commit 7088120) Co-authored-by: Steve Dower <[email protected]>
…non-zero exit code when part of the build fails (pythonGH-31921) (pythonGH-31927) Automerge-Triggered-By: GH:zooba
…H-30891) (pythonGH-30894) Add the following info to test.pythoninfo: * windows.ver: output of the shell "ver" command * windows.version and windows.version_caption: output of the "wmic os get Caption,Version /value" command. (cherry picked from commit b0898f4) * bpo-45382: test.pythoninfo: set wmic.exe encoding to OEM (pythonGH-30890) (cherry picked from commit cef0a54) (cherry picked from commit 4a57fa2) Co-authored-by: Victor Stinner <[email protected]>
…TestCase (pythonGH-31942). (pythonGH-31944) (cherry picked from commit dd0082c) Co-authored-by: Andrew Svetlov <[email protected]>
…ioTestCase (pythonGH-31946) (cherry picked from commit 3dd9bfa) Co-authored-by: Andrew Svetlov <[email protected]>
(cherry picked from commit a7c5414) Co-authored-by: Andrew Svetlov <[email protected]>
(cherry picked from commit dbbe4d2) Co-authored-by: Serhiy Storchaka <[email protected]>
We were using os_helper, which doesn't exist on 3.9. This wasn't caught because the test is only run as root. I confirmed that when run as root, the test previously failed and now passes.
…dule (pythonGH-30654) (pythonGH-31970) (cherry picked from commit a0db11b) Co-authored-by: Bader Zaidan <[email protected]>
…onGH-31961). (pythonGH-31975) (cherry picked from commit 8e3fde7) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…e modes when argument is '-' (pythonGH-13165) (pythonGH-31979) Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-' (so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb'). (cherry picked from commit eafec26) Co-authored-by: MojoVampire <[email protected]>
(cherry picked from commit cb7874f) Co-authored-by: andrei kulakov <[email protected]>
A warning about inline flags not at the start of the regular expression now contains the position of the flag. (cherry picked from commit 4142961) Co-authored-by: Serhiy Storchaka <[email protected]>
). (pythonGH-31976) (pythonGH-31981) (cherry picked from commit cd44afc) (cherry picked from commit a5b7678)
) (pythonGH-32002) Clarifies a versionchanged note on crc32 & adler32 docs that the workaround is only needed for Python 2 and earlier. Also cleans up an unnecessary intermediate variable in the implementation. Authored-By: Ma Lin / animalize Co-authored-by: Gregory P. Smith <[email protected]> (cherry picked from commit 6d290d5) Co-authored-by: Ma Lin <[email protected]>
…ythonGH-32006) (cherry picked from commit 3af68fc) Co-authored-by: jmcb <[email protected]> Co-authored-by: jmcb <[email protected]>
) The `_SharedFile` tracks its own virtual position into the file as `self._pos` and updates it after reading or seeking. `tell()` should return this position instead of calling into the underlying file object, since if multiple `_SharedFile` instances are being used concurrently on the same file, another one may have moved the real file position. Additionally, calling into the underlying `tell` may expose thread safety issues in the underlying file object because it was called without taking the lock. (cherry picked from commit e730ae7) Co-authored-by: Kevin Mehall <[email protected]>
…-32013) (pythonGH-32015) Inputs >= 4GiB to `binascii.crc32(...)` when compiled to use the zlib crc32 implementation (the norm on POSIX) no longer return the wrong result. (cherry picked from commit 4c989e1)
…nGH-32012) (cherry picked from commit 08eb754) Co-authored-by: Serhiy Storchaka <[email protected]>
…s of the specified exception type (pythonGH-32027) (pythonGH-32035) (cherry picked from commit 45833b5)
…1910) (pythonGH-32049) Co-authored-by: Kumar Aditya <[email protected]>. (cherry picked from commit 32e7715) Co-authored-by: Andrew Svetlov <[email protected]>
…ythonGH-26578) Replace the child process `typeperf.exe` with a daemon thread that reads the performance counters directly. This prevents the issues that arise from inherited handles in grandchild processes (see issue37531 for discussion). We only use the load tracker when running tests in multiprocess mode. This prevents inadvertent interactions with tests expecting a single threaded environment. Displaying load is really only helpful for buildbots running in multiprocess mode anyway.. Co-authored-by: Jeremy Kloth <[email protected]>
…12 (pythonGH-31891) (python#31998) Document the deprecation of asyncore, asynchat, and smtpd with a slated removal in Python 3.12 thanks to PEP 594.. (cherry picked from commit 7747384) Co-authored-by: Hugo van Kemenade <[email protected]>
…31932) Co-authored-by: Piet Delport Co-authored-by: Hugo Lopes Tavares Co-authored-by: Jelle Zijlstra <[email protected]> (cherry picked from commit 7ba7eae) Co-authored-by: Daniël van Noord <[email protected]>
Please base this off main |
I know therefore I wrote that a rebase is needed. |
OK, the branch is main-based now. |
Apologises if the swift closure appeared to be rude. GitHub fails to update PR's Commits and Files Changed tabs if a push creates massive changes. So it's way easier to create a new PR for a fixed branch instead of trying to somehow reset notifications and the tabs. |
By the way, branch miscreation happens regularily in the CPython repo so closing and recreation anew became a standard (and default / someway unquestionable) practice. |
Yes, because new contributors apparently have missed this bit in the documentation ("Lifecycle of a Pull Request"):
|
OK, new PR #101220 is there now. |
Proposed PR fixes segfault gh-100795 - avoid unexpected
freeaddrinfo
ifres
becomes not NULL during invocation ofgetaddrinfo
if it fails.Previously this could cause double freeing and other hardly reproducible aftereffects, especially in multithreaded environment.
One could surely do
return -1
instead ofres = NULL
&goto fail
(in second case), like incpython/Modules/socketmodule.c
Line 1095 in 5ef90ee
but this way it is minimal invasive (more consistent, remains safe against some merges or future implementations expecting goto fail to free some other handles, etc).