- 01 Agu, 2018 1 kayıt (commit)
-
-
Victor Stinner yazdı
* Add Include/coreconfig.h * Move config_*() and _PyCoreConfig_*() functions from Modules/main.c to a new Python/coreconfig.c file. * Inline _Py_ReadHashSeed() into config_init_hash_seed() * Move global configuration variables to coreconfig.c
-
- 11 Mar, 2018 1 kayıt (commit)
-
-
Nir Soffer yazdı
fstat may block for long time if the file descriptor is on a non-responsive NFS server, hanging all threads. Most fstat() calls are handled by _Py_fstat(), releasing the GIL internally, but but _Py_fstat_noraise() does not release the GIL, and most calls release the GIL explicitly around it. This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs when calling: - mmap.mmap() - os.urandom() - random.seed()
-
- 14 Ara, 2017 1 kayıt (commit)
-
-
Victor Stinner yazdı
bpo-32329, bpo-32030: * The -R option now turns on hash randomization when the PYTHONHASHSEED environment variable is set to 0 Previously, the option was ignored. * sys.flags.hash_randomization is now properly set to 0 when hash randomization is turned off by PYTHONHASHSEED=0. * _PyCoreConfig_ReadEnv() now reads the PYTHONHASHSEED environment variable. _Py_HashRandomization_Init() now only apply the configuration, it doesn't read PYTHONHASHSEED anymore.
-
- 12 Ara, 2017 1 kayıt (commit)
-
-
Serhiy Storchaka yazdı
-
- 16 Kas, 2017 1 kayıt (commit)
-
-
Victor Stinner yazdı
Parse more env vars in Py_Main(): * Add more options to _PyCoreConfig: * faulthandler * tracemalloc * importtime * Move code to parse environment variables from _Py_InitializeCore() to Py_Main(). This change fixes a regression from Python 3.6: PYTHONUNBUFFERED is now read before calling pymain_init_stdio(). * _PyFaulthandler_Init() and _PyTraceMalloc_Init() now take an argument to decide if the module has to be enabled at startup. * tracemalloc_start() is now responsible to check the maximum number of frames. Other changes: * Cleanup Py_Main(): * Rename some pymain_xxx() subfunctions * Add pymain_run_python() subfunction * Cleanup Py_NewInterpreter() * _PyInterpreterState_Enable() now reports failure * init_hash_secret() now considers pyurandom() failure as an "user error": don't fail with abort(). * pymain_optlist_append() and pymain_strdup() now sets err on memory allocation failure.
-
- 15 Kas, 2017 1 kayıt (commit)
-
-
Victor Stinner yazdı
* Don't use "Python runtime" anymore to parse command line options or to get environment variables: pymain_init() is now a strict separation. * Use an error message rather than "crashing" directly with Py_FatalError(). Limit the number of calls to Py_FatalError(). It prepares the code to handle errors more nicely later. * Warnings options (-W, PYTHONWARNINGS) and "XOptions" (-X) are now only added to the sys module once Python core is properly initialized. * _PyMain is now the well identified owner of some important strings like: warnings options, XOptions, and the "program name". The program name string is now properly freed at exit. pymain_free() is now responsible to free the "command" string. * Rename most methods in Modules/main.c to use a "pymain_" prefix to avoid conflits and ease debug. * Replace _Py_CommandLineDetails_INIT with memset(0) * Reorder a lot of code to fix the initialization ordering. For example, initializing standard streams now comes before parsing PYTHONWARNINGS. * Py_Main() now handles errors when adding warnings options and XOptions. * Add _PyMem_GetDefaultRawAllocator() private function. * Cleanup _PyMem_Initialize(): remove useless global constants: move them into _PyMem_Initialize(). * Call _PyRuntime_Initialize() as soon as possible: _PyRuntime_Initialize() now returns an error message on failure. * Add _PyInitError structure and following macros: * _Py_INIT_OK() * _Py_INIT_ERR(msg) * _Py_INIT_USER_ERR(msg): "user" error, don't abort() in that case * _Py_INIT_FAILED(err)
-
- 24 May, 2017 1 kayıt (commit)
-
-
Eric Snow yazdı
(patch by Nick Coghlan)
-
- 23 May, 2017 1 kayıt (commit)
-
-
Eric Snow yazdı
PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
-
- 09 Ock, 2017 1 kayıt (commit)
-
-
Victor Stinner yazdı
Copy and then adapt Python/random.c from default branch. Difference between 3.5 and default branches: * Python 3.5 only uses getrandom() in non-blocking mode: flags=GRND_NONBLOCK * If getrandom() fails with EAGAIN: py_getrandom() immediately fails and remembers that getrandom() doesn't work. * Python 3.5 has no _PyOS_URandomNonblock() function: _PyOS_URandom() works in non-blocking mode on Python 3.5
-
- 06 Ock, 2017 6 kayıt (commit)
-
-
Victor Stinner yazdı
* dev_urandom() now calls py_getentropy(). Prepare the fallback to support getentropy() failure and falls back on reading from /dev/urandom. * Simplify dev_urandom(). pyurandom() is now responsible to call getentropy() or getrandom(). Enhance also dev_urandom() and pyurandom() documentation. * getrandom() is now preferred over getentropy(). The glibc 2.24 now implements getentropy() on Linux using the getrandom() syscall. But getentropy() doesn't support non-blocking mode. Since getrandom() is tried first, it's not more needed to explicitly exclude getentropy() on Solaris. Replace: "if defined(HAVE_GETENTROPY) && !defined(sun)" with "if defined(HAVE_GETENTROPY)" * Enhance py_getrandom() documentation. py_getentropy() now supports ENOSYS, EPERM & EINTR
-
Victor Stinner yazdı
-
Victor Stinner yazdı
Issue #29157.
-
Victor Stinner yazdı
The glibc now implements getentropy() on Linux using the getrandom() syscall. But getentropy() doesn't support non-blocking mode. Since getrandom() is tried first, it's not more needed to explicitly exclude getentropy() on Solaris. Replace: if defined(HAVE_GETENTROPY) && !defined(sun) with if defined(HAVE_GETENTROPY)
-
Victor Stinner yazdı
pyurandom() is now responsible to call getentropy() or getrandom(). Enhance also dev_urandom() and pyurandom() documentation.
-
Victor Stinner yazdı
Prepare the fallback to support getentropy() failure and falls back on reading from /dev/urandom.
-
- 02 Ock, 2017 1 kayıt (commit)
-
-
Benjamin Peterson yazdı
-
- 20 Ara, 2016 1 kayıt (commit)
-
-
Benjamin Peterson yazdı
-
- 12 Kas, 2016 1 kayıt (commit)
-
-
Ned Deily yazdı
Patch by Gareth Rees.
-
- 20 Eyl, 2016 2 kayıt (commit)
-
-
Victor Stinner yazdı
Issue #27955: Fallback on reading /dev/urandom device when the getrandom() syscall fails with EPERM, for example when blocked by SECCOMP.
-
Victor Stinner yazdı
Issue #27955: modify py_getrnadom() and dev_urandom() * Add comments from Python 3.7 * PEP 7 style: add {...}
-
- 06 Eyl, 2016 1 kayıt (commit)
-
-
Victor Stinner yazdı
Issue #27776: The os.urandom() function does now block on Linux 3.17 and newer until the system urandom entropy pool is initialized to increase the security. This change is part of the PEP 524.
-
- 16 Agu, 2016 4 kayıt (commit)
-
-
Victor Stinner yazdı
-
Victor Stinner yazdı
Merge dev_urandom_python() and dev_urandom_noraise() functions to reduce code duplication.
-
Victor Stinner yazdı
Modify py_getrandom() to not call PyErr_CheckSignals() if raise is zero. _PyRandom_Init() is called very early in the Python initialization, so it's safer to not call PyErr_CheckSignals().
-
Victor Stinner yazdı
* Add pyurandom() helper function to factorize the code * don't call Py_FatalError() in helper functions, but only in _PyRandom_Init() if pyurandom() failed, to uniformize the code
-
- 29 Tem, 2016 1 kayıt (commit)
-
-
Martin Panter yazdı
Based on patch by Roumen Petrov.
-
- 16 Haz, 2016 1 kayıt (commit)
-
-
Victor Stinner yazdı
Issue #27278. It should fix a conversion warning. In practice, the Linux kernel doesn't return more than 32 MB per call to the getrandom() syscall.
-
- 14 Haz, 2016 2 kayıt (commit)
-
-
Victor Stinner yazdı
Casting Py_ssize_t to Py_ssize_t is useless.
-
Victor Stinner yazdı
Issue #27278: Fix os.urandom() implementation using getrandom() on Linux. Truncate size to INT_MAX and loop until we collected enough random bytes, instead of casting a directly Py_ssize_t to int.
-
- 10 Haz, 2016 1 kayıt (commit)
-
-
Martin Panter yazdı
-
- 08 Haz, 2016 1 kayıt (commit)
-
-
Victor Stinner yazdı
Fix a "gcc -pedantic" warning on "buffer += n" because buffer type is void*.
-
- 07 Haz, 2016 1 kayıt (commit)
-
-
Victor Stinner yazdı
Issue #26839: On Linux, os.urandom() now calls getrandom() with GRND_NONBLOCK to fall back on reading /dev/urandom if the urandom entropy pool is not initialized yet. Patch written by Colm Buckley.
-
- 12 Nis, 2016 1 kayıt (commit)
-
-
Victor Stinner yazdı
Issue #26735: Fix os.urandom() on Solaris 11.3 and newer when reading more than 1,024 bytes: call getrandom() multiple times with a limit of 1024 bytes per call.
-
- 07 Kas, 2015 1 kayıt (commit)
-
-
Serhiy Storchaka yazdı
-
- 01 Eki, 2015 2 kayıt (commit)
-
-
Victor Stinner yazdı
getentropy() is blocking, whereas os.urandom() should not block. getentropy() is supported since Solaris 11.3.
-
Victor Stinner yazdı
function instead of the getentropy() function. The getentropy() function is blocking to generate very good quality entropy, os.urandom() doesn't need such high-quality entropy.
-
- 30 Eyl, 2015 1 kayıt (commit)
-
-
Victor Stinner yazdı
Patch written by Remi Pointel.
-
- 18 Eyl, 2015 1 kayıt (commit)
-
-
Victor Stinner yazdı
function instead of the getentropy() function. The getentropy() function is blocking to generate very good quality entropy, os.urandom() doesn't need such high-quality entropy.
-
- 30 Tem, 2015 1 kayıt (commit)
-
-
Victor Stinner yazdı
See the latest version of getrandom() manual page: http://man7.org/linux/man-pages/man2/getrandom.2.html#NOTES The behavior when a call to getrandom() that is blocked while reading from /dev/urandom is interrupted by a signal handler depends on the initialization state of the entropy buffer and on the request size, buflen. If the entropy is not yet initialized, then the call will fail with the EINTR error. If the entropy pool has been initialized and the request size is large (buflen > 256), the call either succeeds, returning a partially filled buffer, or fails with the error EINTR. If the entropy pool has been initialized and the request size is small (buflen <= 256), then getrandom() will not fail with EINTR. Instead, it will return all of the bytes that have been requested. Note: py_getrandom() calls getrandom() with flags=0.
-
- 30 Mar, 2015 1 kayıt (commit)
-
-
Victor Stinner yazdı
(OpenBSD 5.6+).
-