-
Notifications
You must be signed in to change notification settings - Fork 387
LTO warnings on Fedora 36+ #11517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Buristan
added a commit
to Buristan/tarantool
that referenced
this issue
May 20, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of tarantool#11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
Buristan
added a commit
that referenced
this issue
May 21, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of #11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build
github-actions bot
pushed a commit
that referenced
this issue
May 21, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of #11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit 2bde926)
github-actions bot
pushed a commit
that referenced
this issue
May 21, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of #11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit 2bde926)
Buristan
added a commit
to Buristan/tarantool
that referenced
this issue
May 21, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of tarantool#11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit 2bde926)
Buristan
added a commit
to Buristan/tarantool
that referenced
this issue
May 21, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of tarantool#11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit 2bde926)
This was referenced May 21, 2025
Buristan
added a commit
that referenced
this issue
May 26, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of #11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit 2bde926)
Buristan
added a commit
that referenced
this issue
May 26, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of #11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit 2bde926)
Buri
8000
stan
added a commit
that referenced
this issue
May 26, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of #11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit 2bde926)
Buristan
added a commit
that referenced
this issue
May 26, 2025
This patch is a follow-up to the commit 25af976 ("build: support cmake 4.0"). Since version 3.4, CMake doesn't add flags to export symbols from executables without the ENABLE_EXPORTS target property, see CMP0065 [1] for details. Without this property, some unit C tests produce build warnings with LTO optimization enabled (for example, on Fedora 39): NO_WRAP ``` [ 72%] Linking CXX executable luaT_tuple_new.test In function ‘rmean_collect’, inlined from ‘txn_complete_success’ at src/box/txn.c:836:2, inlined from ‘txn_limbo_complete’ at src/box/txn_limbo.c:205:3: src/lib/core/rmean.c:65:9: error: ‘__atomic_add_fetch_8’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 65 | __atomic_add_fetch(&rmean->stats[name].value[0], value, __ATOMIC_RELAXED); | ^ In function ‘txn_limbo_complete’: lto1: note: destination object is likely at address zero ``` NO_WRAP The real reason should be investigated in the scope of #11517. The compilation warning may be suppressed, but it may also mask the actual problems in the future tests. The CMP0065 is removed from CMake version 4.0 [2]. Thus, this patch fixes the behaviour by setting the property `ENABLE_EXPORTS` for unit tests directly. [1]: https://cmake.org/cmake/help/latest/policy/CMP0065.html [2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html#policies-introduced-by-cmake-3-4-removed-by-cmake-4-0 NO_DOC=build NO_TEST=build NO_CHANGELOG=build (cherry picked from commit 2bde926)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After updating the CMake minimum required version to the 3.5 the CMP0065 policy is set to NEW by default.
Thus, without exporting symbols from the test executables, they are produced the following warnings:
Originally observed on 2.11, see this CI run. But may be reproduced on the master branch (before #11509 is merged) with the following Dockerfile:
In the Docker: clone the Tarantool repo and build with the following command:
The issue is observed on the following systems with the following GCC versions:
It looks like the
rmean_box
is considered not initialized but used in theluaT_tuple_new.c
test. It looks suspicious, since none of the functions that call rmean_collect are called either. This warning should be investigated as well as #3742.The text was updated successfully, but these errors were encountered: