With LTO enabled tpm2-pkcs11 build fails with ... + make check make test/unit/test_twist test/unit/test_log test/unit/test_parser test/unit/test_attr make[1]: Entering directory '/builddir/build/BUILD/tpm2-pkcs11-1.3.1' CC test/unit/test_unit_test_twist-test_twist.o CCLD test/unit/test_twist In function 'memcpy', inlined from 'internal_append' at src/lib/twist.c:114:10, inlined from 'twistbin_append' at src/lib/twist.c:302:9, inlined from 'twistbin_append' at src/lib/twist.c:290:7, inlined from 'test_twistbin_new_overflow_3' at test/unit/test_twist.c:264:17: /usr/include/bits/string_fortified.h:34:10: error: '__builtin_memcpy' specified bound 18446744073709551603 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); | ^ In function 'memset', inlined from 'twist_truncate' at src/lib/twist.c:346:3, inlined from 'test_twist_truncate_smaller' at test/unit/test_twist.c:825:17: /usr/include/bits/string_fortified.h:71:10: error: '__builtin_memset' specified bound 18446744073709551612 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); | ^ lto1: all warnings being treated as errors lto-wrapper: fatal error: gcc returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Please see https://koji.fedoraproject.org/koji/taskinfo?taskID=47999421 for full logs. Version-Release number of selected component (if applicable): tpm2-pkcs11-1.3.1-1.fc33 gcc-10.2.1-1.fc33.s390x
All kinds of interesting possibilities here, I'm sure the unique inlining tuning on s390 comes into play. Thanks for passing it along.
So this is a combination of LTO's cross-module inlining combined with a missed optimization computing ranges for integer overflow tests which results in an infeasible path being left in the CFG. On that infeasible path we have propagated a negative constant value into the size argument of a memset call and we get the bogus diagnostic. I've filed an upstream BZ for the missed optimization. There's actually a good chance this will be solvable with work that Andrew & Aldy are looking to land in gcc-11. In the immediate term, I think the s390 disablement of LTO is quite reasonable.
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle. Changing version to 33.
This message is a reminder that Fedora 33 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '33'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 33 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Still actually disabled.