<div dir="ltr">Thanks for the clarification. I'm glad we can keep hash randomization disabled during our builds.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 12, 2017 at 5:22 PM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org" target="_blank">guido@python.org</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"><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"><div><div class="h5">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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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/advisorie<wbr>s/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></div></div>______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/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/mailma<wbr>n/options/python-dev/guido%<wbr>40python.org</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-3020211496935306169gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</font></span></div>
</blockquote></div><br></div>