Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#68071 - [gcc] backport for an important GCC 10 miscompilation regression

Attached to Project: Arch Linux
Opened by ux (ubitux) - Friday, 02 October 2020, 07:32 GMT
Last edited by freswa (frederik) - Friday, 02 October 2020, 15:03 GMT
Task Type Bug Report
Category Packages: Core
Status Assigned
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 3
Private No


Since version 10 is packaged, GCC is mis-compiling code in various memcmp situations:

Basically, the following will return the opposite of the expected result:

char a[] = "\0abc";
return __builtin_memcmp (a, "\0\0\0\0", 4);

(builtin memcmp is sometimes automatically used by gcc when calling memcmp())

The bug has been reported (and fixed upstream) for months, but there is still no backport. The issue is pretty bad as it affects a number of packages; see for more info. The author made patch to detect the mis-compilation, which might be of interest to evaluate the impact on Archlinux packages. On his system only, he detected the issue in the kernel, in a crypto lib used in bitcoin, in codecs, ...

Nevertheless, GCC maintainers don't look reactive given the importance of this bug. I'm also not confident at all having all my packages built with this GCC as I expected this specific issue in a small personal project.
This task depends upon

Comment by ux (ubitux) - Friday, 02 October 2020, 07:42 GMT
Oups I'm sorry forgot to add "[gcc]" in the topic, and it seems I can't edit it.