This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mryan1539
Recipients mryan1539
Date 2016-04-11.17:35:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460396108.06.0.541477402311.issue26735@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-04-11 17:35:08mryan1539setrecipients: + mryan1539
2016-04-11 17:35:08mryan1539setmessageid: <1460396108.06.0.541477402311.issue26735@psf.upfronthosting.co.za>
2016-04-11 17:35:08mryan1539linkissue26735 messages
2016-04-11 17:35:07mryan1539create