GCC-13 warning-as-error in ASN.1 test (false positive) #1383
Replies: 1 comment
-
|
Hi, thank you for reporting. Please put it here https://github.com/srsran/srsRAN_4G/issues Best regards |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm attempting the srsRAN 4G tutorial, and when I run make, I'm getting a GCC-13 -Werror=array-bounds= error. I ran the following to install the repository "git clone https://github.com/srsran/srsRAN_4G.git" and have not altered any of the source code. Can I ignore this and continue, or is there something on my end that I need to fix? Below is the full error. I apologize ahead of time for my inexperience. I'm new to Linux OSs and I need to use this program for a University project. Thank you in advance.
[ 59%] Building CXX object lib/test/asn1/CMakeFiles/srsran_asn1_rrc_meas_test.dir/srsran_asn1_rrc_meas_test.cc.o
In file included from /usr/include/c++/13/bits/stl_uninitialized.h:63,
from /usr/include/c++/13/memory:69,
from /home/cjw/srsRAN_4G/lib/include/srsran/common/common.h:31,
from /home/cjw/srsRAN_4G/lib/include/srsran/common/byte_buffer.h:25,
from /home/cjw/srsRAN_4G/lib/include/srsran/common/buffer_pool.h:25,
from /home/cjw/srsRAN_4G/lib/include/srsran/asn1/asn1_utils.h:25,
from /home/cjw/srsRAN_4G/lib/include/srsran/asn1/rrc/common.h:31,
from /home/cjw/srsRAN_4G/lib/include/srsran/asn1/rrc/rr_common.h:31,
from /home/cjw/srsRAN_4G/lib/include/srsran/asn1/rrc/common_ext.h:31,
from /home/cjw/srsRAN_4G/lib/include/srsran/asn1/rrc/meascfg.h:31,
from /home/cjw/srsRAN_4G/lib/include/srsran/asn1/rrc/bcch_msg.h:31,
from /home/cjw/srsRAN_4G/lib/include/srsran/asn1/rrc/dl_dcch_msg.h:31,
from /home/cjw/srsRAN_4G/lib/test/asn1/srsran_asn1_rrc_meas_test.cc:22:
In static member function ‘static _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = asn1::rrc::meas_id_to_add_mod_s; _Up = asn1::rrc::meas_id_to_add_mod_s; bool _IsMove = false]’,
inlined from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = asn1::rrc::meas_id_to_add_mod_s*; _OI = asn1::rrc::meas_id_to_add_mod_s*]’ at /usr/include/c++/13/bits/stl_algobase.h:506:30,
inlined from ‘_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = asn1::rrc::meas_id_to_add_mod_s*; _OI = asn1::rrc::meas_id_to_add_mod_s*]’ at /usr/include/c++/13/bits/stl_algobase.h:533:42,
inlined from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = asn1::rrc::meas_id_to_add_mod_s*; _OI = asn1::rrc::meas_id_to_add_mod_s*]’ at /usr/include/c++/13/bits/stl_algobase.h:540:31,
inlined from ‘_OI std::copy(_II, _II, _OI) [with _II = asn1::rrc::meas_id_to_add_mod_s*; _OI = asn1::rrc::meas_id_to_add_mod_s*]’ at /usr/include/c++/13/bits/stl_algobase.h:633:7,
inlined from ‘void asn1::dyn_array::resize(uint32_t, uint32_t) [with T = asn1::rrc::meas_id_to_add_mod_s]’ at /home/cjw/srsRAN_4G/lib/include/srsran/asn1/asn1_utils.h:248:18,
inlined from ‘int test_meas_config()’ at /home/cjw/srsRAN_4G/lib/test/asn1/srsran_asn1_rrc_meas_test.cc:183:42:
/usr/include/c++/13/bits/stl_algobase.h:437:30: error: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ forming offset 3 is out of the bounds [0, 3] [-Werror=array-bounds=]
437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In static member function ‘static _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = asn1::rrc::quant_cfg_nr_r15_s; _Up = asn1::rrc::quant_cfg_nr_r15_s; bool _IsMove = false]’,
inlined from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = asn1::rrc::quant_cfg_nr_r15_s*; _OI = asn1::rrc::quant_cfg_nr_r15_s*]’ at /usr/include/c++/13/bits/stl_algobase.h:506:30,
inlined from ‘_OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = asn1::rrc::quant_cfg_nr_r15_s*; _OI = asn1::rrc::quant_cfg_nr_r15_s*]’ at /usr/include/c++/13/bits/stl_algobase.h:533:42,
inlined from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = asn1::rrc::quant_cfg_nr_r15_s*; _OI = asn1::rrc::quant_cfg_nr_r15_s*]’ at /usr/include/c++/13/bits/stl_algobase.h:540:31,
inlined from ‘_OI std::copy(_II, _II, _OI) [with _II = asn1::rrc::quant_cfg_nr_r15_s*; _OI = asn1::rrc::quant_cfg_nr_r15_s*]’ at/usr/include/c++/13/bits/stl_algobase.h:633:7,
inlined from ‘void asn1::dyn_array::resize(uint32_t, uint32_t) [with T = asn1::rrc::quant_cfg_nr_r15_s]’ at /home/cjw/srsRAN_4G/lib/include/srsran/asn1/asn1_utils.h:248:18,
inlined from ‘int test_meas_config()’ at /home/cjw/srsRAN_4G/lib/test/asn1/srsran_asn1_rrc_meas_test.cc:194:57:
/usr/include/c++/13/bits/stl_algobase.h:437:30: error: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ forming offset 36 is out of the bounds [0, 36] [-Werror=array-bounds=]
437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [lib/test/asn1/CMakeFiles/srsran_asn1_rrc_meas_test.dir/build.make:76: lib/test/asn1/CMakeFiles/srsran_asn1_rrc_meas_test.dir/srsran_asn1_rrc_meas_test.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8585: lib/test/asn1/CMakeFiles/srsran_asn1_rrc_meas_test.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
Beta Was this translation helpful? Give feedback.
All reactions