[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

STINNER Victor report at bugs.python.org
Thu Jan 17 09:36:57 EST 2019


STINNER Victor <vstinner at redhat.com> added the comment:

> If gcc-8.0.1-0.14.fc28.ppc64le miscompiles memcpy(), perhaps the upstream priority in https://bugzilla.redhat.com/show_bug.cgi?id=1540995 should be "release blocker".

With the bug, memoryview doesn't round properly float: rounds to zero rather than rounding to nearest. It's not a critical crash or critical security vulnerability :-)

Anyway, I wrote a fix: PR 11593. My fix is to workaround the GCC compiler bug using volatile but only on ppc64. My change only impacts the 'f' type on ppc64 when compiled by GCC. Other architectures, compilers and types are unaffected and so have no impact on performances.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35752>
_______________________________________


More information about the Python-bugs-list mailing list