[issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64

Yury V. Zaytsev report at bugs.python.org
Tue Jan 7 18:07:37 CET 2014


Yury V. Zaytsev added the comment:

Digging more into it, I guess I know why we couldn't come up with a minimal reproducer for this problem. If I compile with -O2 instead of -O1, I get the following warning from gcc:

Python/pyhash.c:413: warning: dereferencing pointer 'pt.32' does break strict-aliasing rules

which points to the following line:

case 4: *((PY_UINT32_T*)&pt[0]) = *((PY_UINT32_T*)&m[0]); break;

If I re-compile with -O2, but -fno-strict-aliasing, then the result doesn't fail.

Not sure if siphash code can be changed to not require aliasing, though.

----------

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


More information about the Python-bugs-list mailing list