[issue15340] OSError with "import random" when /dev/urandom doesn't exist (regression from 2.6)

The Written Word report at bugs.python.org
Fri Aug 31 09:33:45 CEST 2012


The Written Word added the comment:

Actually, this regression appeared after the Hash Randomization patches prior to 2.6.8, 2.7.3, 3.1.4 and 3.2.3.

Also, it not only breaks `from os import urandom`, but also prevents installation of many third-party packages that use setuptools or distribute, where the interpreter bails out with: "OSError: No such file or directory /dev/urandom" inside setup.py on all Tru64 machines, and HPUX 11.00 and 11.11 (at least).

As best I can tell it's failing either because dev_urandom_noraise aborts the interpreter if /dev/urandom is missing, or later an uncaught PyExc_OSError in dev_urandom_python triggers for the same reason.  In either case there's no NotImplemented exception raised for the fallback code be used :(

----------
nosy: +bugs-python at vendor.thewrittenword.com
versions: +Python 2.6, Python 3.1, Python 3.2

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


More information about the Python-bugs-list mailing list