Created attachment 1988683 [details] reproducer When packaging zpaqfranz (bug #2238725), I discovered a segfault on i686 <https://github.com/fcorbelli/zpaqfranz/issues/71>. I believe this is caused by GCC which miscompiled a loading of an uint64_t array member passed by a pointer in static function. If you build an attached reproducer with "gcc -O1 -g -Dunix t2.cc" on i686, and disassemble a HighwayHashReset() function, you can see that loading key[3] at the last line of the function: state->v1[3] = state->mul1[3] ^ ((key[3] >> 32) | (key[3] << 32)); is miscompiled like: movl 28(%eax), %ecx movl 24(%ecx), %ebx while expected assembly code is: movl 28(%eax), %ecx movl 24(%eax), %ebx A trigger is having the HighwayHashReset() function static and compiling with -O1. Lowering the optimization or removing the static keyword fixes the assembly code. This does not happen on other 64-bit architectures.
Looks like it was fixed by https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=790c1f60a5662b16eb19eb4b81922995863c7571 commit 790c1f60a5662b16eb19eb4b81922995863c7571 Author: Roger Sayle <roger> Date: Thu Aug 3 07:12:04 2023 +0100 PR target/110792: Early clobber issues with rot32di2_doubleword on i386. The fix is not yet in GCC 13 but Sam & I asked for it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110792#c16
That indeed looks similar.
FEDORA-2023-1c6b112a75 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-1c6b112a75
FEDORA-2023-1c6b112a75 has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-1c6b112a75` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-1c6b112a75 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-1c6b112a75 has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2024-a5ef56504d (gcc-13.2.1-7.fc38) has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2024-a5ef56504d
FEDORA-2024-a5ef56504d has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-a5ef56504d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-a5ef56504d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-a5ef56504d (gcc-13.2.1-7.fc38) has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.