Created attachment 1542027[details]
Reduced test case from gmp-ecm
Description of problem:
The gmp-ecm package failed the mass rebuild, on s390x only. I will attach a reduced version of the failing test. When built with "gcc -O2 -Wall -Wextra -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations", the code segfaults due to walking off the end of an allocated block of memory. Libusan is unavailable on s390x, so I cannot check with -fsanitize=undefined, but on x86_64 the sanitizer gives no errors.
When built with "gcc -O2 -fno-code-hoisting", the code does not segfault, and neither valgrind nor the address sanitizer shows any errors.
Version-Release number of selected component (if applicable):
gcc-9.0.1-0.4.fc30.s390x
How reproducible:
Always
Steps to Reproduce:
1. Build the attached code with -O2
2.
3.
Actual results:
The code segfaults unless -fno-code-hoisting is also given.
Expected results:
No segfault.
Additional info:
Created attachment 1542027 [details] Reduced test case from gmp-ecm Description of problem: The gmp-ecm package failed the mass rebuild, on s390x only. I will attach a reduced version of the failing test. When built with "gcc -O2 -Wall -Wextra -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations", the code segfaults due to walking off the end of an allocated block of memory. Libusan is unavailable on s390x, so I cannot check with -fsanitize=undefined, but on x86_64 the sanitizer gives no errors. When built with "gcc -O2 -fno-code-hoisting", the code does not segfault, and neither valgrind nor the address sanitizer shows any errors. Version-Release number of selected component (if applicable): gcc-9.0.1-0.4.fc30.s390x How reproducible: Always Steps to Reproduce: 1. Build the attached code with -O2 2. 3. Actual results: The code segfaults unless -fno-code-hoisting is also given. Expected results: No segfault. Additional info: