Repository navigation
build warning with gcc 12 #54736
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
Description
Activity
If we look at a rhel8-x64 build (where we haven't enabled
--error-on-warn) we can see several instances of this warning being emitted, e.g. https://ci.nodejs.org/job/node-test-commit-linux/nodes=rhel8-x64/60200/consoleFull.- addedbuildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
on Sep 3, 2024 Other examples
https://ci.nodejs.org/job/node-test-commit-linux/nodes=rhel8-x64/60200/consoleFull15:21:13 inlined from ‘void node::Dotenv::ParseContent(std::string_view)’ at ../src/node_dotenv.cc:164:35: 15:21:13 /opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/char_traits.h:431:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Wrestrict] 15:21:13 431 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); 15:21:13 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~15:21:16 inlined from ‘virtual std::string node::SocketAddressBlockList::SocketAddressMaskRule::ToString()’ at ../src/node_sockaddr.cc:500:14: 15:21:16 /opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/char_traits.h:431:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Wrestrict] 15:21:16 431 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); 15:21:16 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~15:21:16 inlined from ‘node::task_runner::ProcessRunner::ProcessRunner(std::shared_ptr<node::InitializationResultImpl>, const std::filesystem::__cxx11::path&, std::string_view, std::string_view, std::string_view, const node::task_runner::PositionalArgs&)’ at ../src/node_task_runner.cc:58:26: 15:21:16 /opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/char_traits.h:431:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Wrestrict] 15:21:16 431 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); 15:21:16 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~15:21:16 inlined from ‘static void node::url::BindingData::Format(const v8::FunctionCallbackInfo<v8::Value>&)’ at ../src/node_url.cc:228:38: 15:21:16 /opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/char_traits.h:431:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Wrestrict] 15:21:16 431 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); 15:21:16 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~15:21:20 inlined from ‘void node::crypto::LogSecret(const SSLPointer&, const char*, const unsigned char*, std::size_t)’ at ../src/crypto/crypto_common.cc:61:15: 15:21:20 /opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/char_traits.h:431:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Wrestrict] 15:21:20 431 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); 15:21:20 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~15:21:20 inlined from ‘void node::crypto::LogSecret(const SSLPointer&, const char*, const unsigned char*, std::size_t)’ at ../src/crypto/crypto_common.cc:64:11: 15:21:20 /opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/char_traits.h:431:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Wrestrict] 15:21:20 431 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); 15:21:20 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~I've opened #54737 to turn off
-Wrestrict(i.e.-Wno-restrict).- added 3 commits that reference this issue
on Sep 22, 2024
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
We recently switched to build with gcc 12 on RHEL (other platforms to follow) in nodejs/build#3886.
This is causing ubi81_sharedlibs_openssl111fips_x64 to fail as it builds with
--error-on-warn.e.g. https://ci.nodejs.org/job/node-test-commit-linux-containered/45894/nodes=ubi81_sharedlibs_openssl111fips_x64/