| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
(GH-12252)
(cherry picked from commit 8b91edadc06dcb0d391a65d1ecdf07dcb429df1b)
Co-authored-by: sth <sth.dev@tejp.de>
|
| |
|
|
|
| |
(cherry picked from commit b71e28ea91259ca3914e2ff84fc126795ea6b848)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix two unlikely reference leaks in _hashopenssl. The leaks only occur in
out-of-memory cases. Thanks to Charalampos Stratakis.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue36179
(cherry picked from commit b7bc283ab6a23ee98784400ebffe7fe410232a2e)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-4348)
This is needed to even the run the test suite on buildbots for affected platforms; e.g.:
```
./python.exe ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=11700 -j2
/home/embray/src/python/test-worker/3.x.test-worker/build/python -u -W default -bb -E -W error::BytesWarning -m test -r -w -j 1 -u all -W --slowest --fail-env-changed --timeout=11700 -j2
Traceback (most recent call last):
File "./Tools/scripts/run_tests.py", line 56, in <module>
main(sys.argv[1:])
File "./Tools/scripts/run_tests.py", line 52, in main
os.execv(sys.executable, args)
PermissionError: [Errno 13] Permission denied
make: *** [Makefile:1073: buildbottest] Error 1
```
(cherry picked from commit 7a7693e9cb12e5571c76331db56a28eef9acb6e0)
Co-authored-by: E. M. Bray <erik.m.bray@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
The standard math library (libm) may follow IEEE-754 recommendation to
include an implementation of sinPi(), i.e. sinPi(x):=sin(pi*x).
And this triggers a name clash, found by FreeBSD developer
Steve Kargl, who worken on putting sinpi into libm used on FreeBSD
(it has to be named "sinpi", not "sinPi", cf. e.g.
https://en.cppreference.com/w/c/experimental/fpext4).
(cherry picked from commit f57cd8288dbe6aba99c057f37ad6d58f8db75350)
Co-authored-by: Dima Pasechnik <dimpase@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 6673decfa0fb078f60587f5cb5e98460eea137c2)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit abe5922743f62e130c4dad2f637274c38d6b1e8b)
Co-authored-by: E. M. Bray <erik.m.bray@gmail.com>
|
| |
|
|
|
|
|
|
| |
from sys.modules (GH-9047) (GH-11921)
Fix C implementation of pickle.loads to use importlib's locking mechanisms, and thereby avoid using partially-loaded modules.
(cherry picked from commit 4371c0a9c0848f7a0947d43f26f234842b41efdf)
Co-authored-by: tjb900 <ozburgess@gmail.com>
|
| |
|
|
|
|
|
|
| |
Need to reset capturing groups between two SRE(match) callings in loops, this fixes wrong capturing groups in rare cases.
Also add a missing index in re.rst.
(cherry picked from commit 4a7f44a2ed49ff1e87db062e7177a56c6e4bbdb0)
Co-authored-by: animalize <animalize@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
path_converter (GH-11831)
The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.
(cherry picked from commit 09fbcd6085e18b534fd4161844ff39f77eb4a082)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-11849)
(cherry picked from commit bb3c05d7efca8d23bf39bc2640297ba2598899f3)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 73d600239b0aa34198bce2b7982e4ff14c92f119)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
| |
|
|
| |
(GH-11795) (GH-11798)
|
| |
|
|
|
|
| |
Make sure that failure paths call CloseHandle outside of the function that failed
(cherry picked from commit b82bfac4369c0429e562a834b3752e66c4821eab)
Co-authored-by: Mark Becwar <mark@thebecwar.com>
|
| |
|
|
| |
(GH-11715) (GH-11716)
|
| |
|
|
|
|
|
|
| |
This fixes the ctypes.test.test_structures.StructureTestCase test.
https://bugs.python.org/issue35847
(cherry picked from commit 742d768656512a469ce9571b1cbd777def7bc5ea)
Co-authored-by: Andreas Schwab <schwab@linux-m68k.org>
|
| | |
|
| |
|
|
|
|
|
|
|
| |
When the loop in the pymain_read_conf function in this same file
calls pymain_init_cmdline_argv() a 2nd time, the pymain->command
buffer of wchar_t is overriden and the previously allocated memory
is never freed.
(cherry picked from commit 35ca1820e19f81f69073f294503cdcd708fe490f)
Co-authored-by: Lucas Cimon <lucas.cimon@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
distribution points with empty DP or URI correctly. A malicious or buggy
certificate can result into segfault.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue35746
(cherry picked from commit a37f52436f9aa4b9292878b72f3ff1480e2606c3)
Co-authored-by: Christian Heimes <christian@python.org>
|
| |
|
|
|
|
|
|
|
|
| |
Previously, calling the strftime() method on a datetime object with a
trailing '%' in the format string would result in an exception. However,
this only occured when the datetime C module was being used; the python
implementation did not match this behavior. Datetime is now PEP-399
compliant, and will not throw an exception on a trailing '%'.
(cherry picked from commit 454b3d4ea246e8751534e105548d141ed7b0b032)
Co-authored-by: MichaelSaah <mike.saah@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix memory leaks in asyncio ProactorEventLoop on overlapped operation
failures.
Changes:
* Implement the tp_traverse slot in the _overlapped.Overlapped type
to help to break reference cycles and identify referrers in the
garbage collector.
* Always clear overlapped on failure: not only set type to
TYPE_NOT_STARTED, but release also resources.
(cherry picked from commit 5485085b324a45307c1ff4ec7d85b5998d7d5e0d)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
| |
Fix a memory leak in asyncio in the ProactorEventLoop when ReadFile()
or WSASend() overlapped operation fail immediately: release the
internal buffer.
(cherry picked from commit a234e148394c2c7419372ab65b773d53a57f3625)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
| |
Modules/_sha3/cleanup.py (GH-11411)
(cherry picked from commit d466c43e55cd32af84e353f0e9a48b09b7534f61)
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
|
| |
|
|
|
|
|
| |
It doesn't know the details of a few less common libc functions..
(cherry picked from commit 1d300ce1d8238136595c8fea76266a4755cd73a2)
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
|
| |
|
|
|
|
|
|
|
|
| |
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.
Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_systemGH-Solaris
https://bugs.python.org/issue35550
(cherry picked from commit 6f9bc72c79c3262e5d0f2c0e96b016477399cfb1)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
|
| |
|
|
|
|
|
|
| |
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 387512c7ecde6446f2e29408af2e16b9fc043807)
Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
|
| |
|
|
|
|
|
|
|
|
| |
(GH-11375) (GH-11378)
Add Clang Memory Sanitizer build instrumentation to work around
false positives from the socket and time modules as well as skipping
a couple test_faulthandler tests.
(cherry picked from commit b474e6774d60fa67d5373e361a0ed53c18b24f53)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
| |
"dll" would leak if an error occurred in _validate_paramflags() or
GenericPyCData_new().
(cherry picked from commit d77d97c9a1f593fe161afab97e2a3e2292ab88b9)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit d2a75c67830d7c9f59e4e9b60f36974234c829ef)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-11175)
(cherry picked from commit 842acaab1376c5c84fd5966bb6070e289880e1ca)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
| |
AC. (GH-11150). (GH-11151)
(cherry picked from commit afb3e71a1710c444fbe789b51df43ee16ee9ede7)
|
| |
|
|
|
|
|
| |
CreateProcessW(). (GH-11141). (GH-11149)
(cherry picked from commit 7b36016a15aeed0d76a4c05a66203e6d7723aace)
Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
|
| |
|
|
|
| |
(GH-11047) (GH-11107)
(cherry picked from commit bb86bf4c4eaa30b1f5192dab9f389ce0bb61114d)
|
| |
|
|
|
|
|
|
| |
* bpo-35454: Fix miscellaneous minor issues in error handling.
* Fix a null pointer dereference.
(cherry picked from commit 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit b6ef6f69a9afc979640a5f9883f799de1364bff7)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
Include <pyconfig.h> ealier in Modules/expat/xmltok.c to define
properly _POSIX_C_SOURCE. Python defines _POSIX_C_SOURCE as 200809L,
whereas <features.h> (included indirectly by <string.h>) defines
_POSIX_C_SOURCE as 199506L.
(cherry picked from commit cf247359d5b7082044eea1fa94b5211a172b1ff6)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
The length check for AF_ALG salg_name and salg_type had a off-by-one
error. The code assumed that both values are not necessarily NULL
terminated. However the Kernel code for alg_bind() ensures that the last
byte of both strings are NULL terminated.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 2eb6ad8578fa9d764c21a92acd8e054e3202ad19)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In _localemodule.c and selectmodule.c, remove dead code that would
cause double decrefs if run.
In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases
where a new list is populated and there is no possibility of an error.
In addition, check if the list changed size in the loop in array_array_fromlist().
(cherry picked from commit 99d56b53560b3867844472ae381fb3f858760621)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
| |
Python 2. (GH-11017) (GH-11022)
encoding='latin1' should be used for successful decoding.
(cherry picked from commit 8452ca15f41061c8a6297d7956df22ab476d4df4)
|
| |
|
|
|
| |
(GH-11015) (GH-11020)
(cherry picked from commit 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9)
|
| |
|
|
|
|
|
| |
character. (GH-10863)
(cherry picked from commit 3ffa8b9ba190101f674a0e524e482a83ed09cccd)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
select() calls are retried on EINTR (per PEP 475). However, if a
timeout was provided and the deadline has passed after running the
signal handlers, rlist, wlist and xlist should be cleared since select(2)
left them unmodified.
(cherry picked from commit 7f52415a6d4841d77d3b7853e83b25a22e0048dc)
Co-authored-by: Oran Avraham <252748+oranav@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(GH-9165). (GH-10947)
(cherry picked from commit 34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b)
Co-authored-by: William Grzybowski <wg@FreeBSD.org>
|
| |
|
|
|
|
|
| |
(GH-8113). (GH-10946)
(cherry picked from commit 5b25f1d03100e2283c1b129d461ba68ac0169a14)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
|
| |
|
|
|
|
|
| |
save_reduce(). (GH-9886)
(cherry picked from commit 25d389789c59a52a31770f7c50ce9e02a8909190)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-35373: Fix PyInit_timezone() error handling
PyInit_timezone() now returns -1 at exit if an exception is raised.
Check also explicitly PyUnicode_DecodeLocale() and Py_BuildValue()
errors.
* bpo-35373: Fix PyInit_time() error handling (GH-10865)
* PyInit_time() now returns NULL if an exception is raised.
* Rename PyInit_timezone() to init_timezone(). "PyInit_" prefix is
a special prefix for function initializing a module.
init_timezone() doesn't initialize a module and the function is not
exported.
(cherry picked from commit 3bb150d8148e3cc08418077a58f43e064b9fde61)
|
| |
|
|
|
|
|
|
| |
PyCArg_repr(). (GH-10853)
Use "ll" instead of the nonstandard "q".
(cherry picked from commit 062cbb67726f26794b1b461853e40696b4a0b220)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
get_gmtoff() now returns time_t instead of int to fix the following
Visual Studio warning:
Modules\timemodule.c(1183): warning C4244: 'return':
conversion from 'time_t' to 'int', possible loss of data
(cherry picked from commit 503ce5c482cb267b0770bc46c315d5cf822bdca9)
|
| |
|
|
|
|
| |
Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the C
locale if the LC_CTYPE locale is "C".
(cherry picked from commit 55e498058faf8c97840556f6d791c2c392732dc3)
|