On ppc64le gcc8 generates inlined code for str[n]cmp that valgrind memcheck cannot proof correct. gcc9/trunk generates slightly different code for the inlined strncmp code that valgrind memcheck can proof correct with some patches. The gcc patch https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01589.html needs to be backported to solve this (and then at least glibc needs to be rebuild with the patched compiler).
This is now backported to the upstream gcc-8-branch: Author: acsawdey Date: Wed Nov 28 19:33:04 2018 New Revision: 266578 URL: https://gcc.gnu.org/viewcvs?rev=266578&root=gcc&view=rev Log: 2018-11-28 Aaron Sawdey <acsawdey.com> Backport from mainline 2018-10-25 Aaron Sawdey <acsawdey.com> * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to a shorter sequence with fewer branches. (emit_final_str_compare_gpr): Ditto. Backport from mainline to allow the above code to go in: 2018-06-14 Aaron Sawdey <acsawdey.com> * config/rs6000/rs6000-string.c (do_and3, do_and3_mask, do_cmpb3, do_rotl3): New functions. Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/config/rs6000/rs6000-string.c
It would be great to also get this fixed for f28. Since that is the last Fedora release supporting ppc64[be]. f28, f29 and rawhide currently use the same gcc version.
gcc-8.2.1-6.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2541d28e6b
gcc-8.2.1-6.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-59636246ac
gcc-8.2.1-6.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
gcc-8.2.1-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.