Showing content from http://mail.python.org/pipermail/python-dev/attachments/20170512/3da5ccfd/attachment.html below:
<div dir="ltr"><div>Don't worry, the PYTHONHASHSEED setting does not get recorded in the bytecode header and the generated bytecode (even if it sometimes differs in trivial ways) is usable with all hash seed settings.<br><br></div>--Guido<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 12, 2017 at 6:06 AM, Freddy Rietdijk <span dir="ltr"><<a href="mailto:freddyrietdijk@fridh.nl" target="_blank">freddyrietdijk@fridh.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>On Nix we set PYTHONHASHSEED to 0 when building packages, disabling hash randomization. We do this to improve determinism of the builds because we store the bytecode next to the code. </div><div><br></div><div>When one runs Python directly or via a script PYTHONHASHSEED is not set thus enabling hash randomization. Am I correct when I say that in this case Python still uses the reproducibly build bytecode and, because its now running with a random seed we wouldn't be vulnerable to <a href="http://www.ocert.org/advisories/ocert-2011-003.html" target="_blank">http://www.ocert.org/<wbr>advisories/ocert-2011-003.html</a> ? Or would it also try to each time also recompile bytecode?</div><div><br></div><div>Kind regards,</div><div><br></div><div>Freddy</div><div><br></div><div> </div></div>
<br>______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>guido%40python.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4