Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Actions] Patch the Linux workflows after GitHub runners update, disa…
…ble one warning (#841) * Use the develop branch for testing * Update the multilib version, use venv for jsonref * Bluetooth::UUID can be unitilized by design * The warning supression has to take place elsewhere * Test the bluetooth uuid changes in Thunder * Try to use ::copy instead of ::memcpy Looks like the compiler doesn't understand no array bound issues can happen in that case, but apparently the ::copy can help compiler to see that, let's try it out. Here is the error given with ::memcpy: [67/176] Building CXX object DHCPServer/CMakeFiles/ThunderDHCPServer.dir/DHCPServer.cpp.o FAILED: DHCPServer/CMakeFiles/ThunderDHCPServer.dir/DHCPServer.cpp.o /usr/bin/c++ -DBLUEZ_HAS_NO_INCLUSIVE_LANGUAGE -DNO_INCLUSIVE_LANGUAGE -DPROCESSCONTAINERS_ENABLED=1 -DTHUNDER_PLATFORM_PC_UNIX=1 -DThunderDHCPServer_EXPORTS -DWARNING_REPORTING_ENABLED -D_TRACE_LEVEL=0 -D__CORE_BLUETOOTH_SUPPORT__ -D__CORE_MESSAGING__ -D__CORE_NO_WCHAR_SUPPORT__ -D__CORE_WARNING_REPORTING__ -isystem /home/runner/work/ThunderNanoServices/ThunderNanoServices/Release/install/usr/include/Thunder -isystem /home/runner/work/ThunderNanoServices/ThunderNanoServices/Release/install/usr/include -isystem /home/runner/work/ThunderNanoServices/ThunderNanoServices/Release/install/usr/include/Thunder/processcontainers -Wall -Wextra -Wpedantic -Werror -m64 -O3 -DNDEBUG -std=gnu++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT DHCPServer/CMakeFiles/ThunderDHCPServer.dir/DHCPServer.cpp.o -MF DHCPServer/CMakeFiles/ThunderDHCPServer.dir/DHCPServer.cpp.o.d -o DHCPServer/CMakeFiles/ThunderDHCPServer.dir/DHCPServer.cpp.o -c /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServer.cpp In file included from /usr/include/string.h:548, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/Release/install/usr/include/Thunder/core/Portability.h:406, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/Release/install/usr/include/Thunder/core/Module.h:26, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/Release/install/usr/include/Thunder/core/core.h:27, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/Release/install/usr/include/Thunder/plugins/Module.h:26, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/Release/install/usr/include/Thunder/plugins/plugins.h:30, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/Module.h:26, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServerImplementation.h:23, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServer.h:22, from /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServer.cpp:20: In function ‘void* memcpy(void*, const void*, size_t)’, inlined from ‘Thunder::Plugin::DHCPServerImplementation::Identifier::Identifier(const uint8_t*, uint8_t)’ at /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServerImplementation.h:170:29, inlined from ‘Thunder::Plugin::DHCPServerImplementation::Identifier::Identifier(const uint8_t*, uint8_t)’ at /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServerImplementation.h:164:13, inlined from ‘Thunder::Plugin::DHCPServerImplementation::Lease Thunder::Plugin::DHCPServer::Data::Server::Lease::Get() const’ at /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServer.h:89:97, inlined from ‘void Thunder::Plugin::DHCPServer::LoadLeases(const string&, Thunder::Plugin::DHCPServerImplementation&)’ at /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServer.cpp:242:63: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: error: ‘void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)’ forming offset 16 is out of the bounds [0, 16] of object ‘buffer’ with type ‘uint8_t [16]’ {aka ‘unsigned char [16]’} [-Werror=array-bounds=] 29 | return __builtin___memcpy_chk (__dest, __src, __len, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ 30 | __glibc_objsize0 (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServer.h: In member function ‘void Thunder::Plugin::DHCPServer::LoadLeases(const string&, Thunder::Plugin::DHCPServerImplementation&)’: /home/runner/work/ThunderNanoServices/ThunderNanoServices/ThunderNanoServices/DHCPServer/DHCPServer.h:84:33: note: ‘buffer’ declared here 84 | uint8_t buffer[DHCPServerImplementation::Identifier::maxLength]; | ^~~~~~ cc1plus: all warnings being treated as errors * Bluetooth changes were already merged in Thunder, use the master workflow * Adding std in front of ::copy * Using std::copy instead of memcpy doesn't help the compiler So it looks like we will have to disable this warning in this case * Use the develop branch of Thunder to test the new macro * Use the new macro to disable false positive array bound warnings * Make sure to check out the develop branch to test the patches * Use the macro on the whole constructor, but do not use it anywhere else since it seems not necessary * Use the master branch of Thunder as the PR with macro was created * Check out the master branch again as development is over
- Loading branch information