[issue25003] os.urandom() should call getrandom(2) not getentropy(2) on Solaris 11.3 and newer

John Beck report at bugs.python.org
Thu Sep 10 21:40:25 CEST 2015


John Beck added the comment:

Sorry, let me try to clarify.  ENOSYS is the correct errno value to check for, for the situation (e.g., Solaris < 11.3) of a non-existent system call. But EINVAL should also be checked for to make sure the system call was invoked with proper parameters.  My builds of Python 3.5.0.X (don't recall whether X was a late Beta or release candidate) were core dumping because Python was making that syscall but not checking for EINVAL, and thus assuming the call was valid, when it was not.  Sorry, I did not try to debug why it was invalid.  But once I added EINVAL, alongside ENOSYS, as a reason to set getrandom_works to 0, then python started behaving properly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25003>
_______________________________________


More information about the Python-bugs-list mailing list