[New-bugs-announce] [issue26735] os.urandom(2500) fails on Solaris 11.3
Matthew Ryan
report at bugs.python.org
Mon Apr 11 13:35:08 EDT 2016
New submission from Matthew Ryan:
On Solaris 11.3 (intel tested, but I assume issue is on SPARC as well),
I found the following fails:
import os
os.urandom(2500)
The above throws OSError: [Errno 22] Invalid argument.
It turns out that the Solaris version of getrandom() is limited to returning
no more than 1024 bytes, per the manpage:
The getrandom() and getentropy() functions fail if:
EINVAL The flags are not set to GRND_RANDOM, GRND_NONBLOCK or both,
or bufsz is <= 0 or > 1024.
I've attached a possible patch for this issue, against the 3.5.1 source
tree.
----------
files: python3-getrandom.patch
keywords: patch
messages: 263191
nosy: mryan1539
priority: normal
severity: normal
status: open
title: os.urandom(2500) fails on Solaris 11.3
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file42433/python3-getrandom.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26735>
_______________________________________
More information about the New-bugs-announce
mailing list