Skip to content
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

RecoEgamma/EgammaIsolationAlgos : array bounds warning/error found in gcc 13.3.1 build #47222

Open
gartung opened this issue Jan 30, 2025 · 4 comments

Comments

@gartung
Copy link
Member

gartung commented Jan 30, 2025

In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_uninitialized.h:63,
                 from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/memory:69,
                 from src/DataFormats/Common/interface/EDProductfwd.h:9,
                 from src/DataFormats/Common/interface/Ref.h:105,
                 from src/DataFormats/EgammaCandidates/interface/GsfElectronFwd.h:5,
                 from src/DataFormats/EgammaCandidates/interface/GsfElectron.h:4,
                 from src/RecoEgamma/EgammaIsolationAlgos/interface/ElectronTkIsolation.h:11,
                 from src/RecoEgamma/EgammaIsolationAlgos/src/ElectronTkIsolation.cc:9:
In static member function 'static constexpr _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = const int; _Up = int; bool _IsMove = false]',
    inlined from 'constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const int*; _OI = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:506:30,
    inlined from 'constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const int*; _OI = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:533:42,
    inlined from 'constexpr _OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const int*; _OI = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:540:31,
    inlined from 'constexpr _OI std::copy(_II, _II, _OI) [with _II = const int*; _OI = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:633:7,
    inlined from 'constexpr void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const int*; _Tp = int; _Alloc = std::allocator<int>]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/vector.tcc:341:15,
    inlined from 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_vector.h:790:21,
    inlined from 'void ElectronTkIsolation::setAlgosToReject()' at src/RecoEgamma/EgammaIsolationAlgos/src/ElectronTkIsolation.cc:118:57:
  /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:437:30: error: 'void* __builtin_memmove(void*, const void*, long unsigned int)' forming offset 4 is out of the bounds [0, 4] of object '<anonymous>' with type 'const int [1]' [-Werror=array-bounds=]
   437 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/RecoEgamma/EgammaIsolationAlgos/src/ElectronTkIsolation.cc: In member function 'void ElectronTkIsolation::setAlgosToReject()':
src/RecoEgamma/EgammaIsolationAlgos/src/ElectronTkIsolation.cc:118:57: note: '<anonymous>' declared here
  118 |   algosToReject_ = {reco::TrackBase::jetCoreRegionalStep};
      |                                                         ^
In static member function 'static constexpr _Up* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(_Tp*, _Tp*, _Up*) [with _Tp = const int; _Up = int; bool _IsMove = false]',
    inlined from 'constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const int*; _OI = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:506:30,
    inlined from 'constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const int*; _OI = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:533:42,
    inlined from 'constexpr _OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const int*; _OI = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:540:31,
    inlined from 'constexpr _OI std::copy(_II, _II, _OI) [with _II = const int*; _OI = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:633:7,
    inlined from 'static _ForwardIterator std::__uninitialized_copy<true>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const int*; _ForwardIterator = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_uninitialized.h:147:27,
    inlined from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const int*; _ForwardIterator = int*]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_uninitialized.h:185:15,
    inlined from 'constexpr _ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = const int*; _ForwardIterator = int*; _Tp = int]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_uninitialized.h:373:37,
    inlined from 'constexpr void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const int*; _Tp = int; _Alloc = std::allocator<int>]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/vector.tcc:345:35,
    inlined from 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]' at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_vector.h:790:21,
    inlined from 'void ElectronTkIsolation::setAlgosToReject()' at src/RecoEgamma/EgammaIsolationAlgos/src/ElectronTkIsolation.cc:118:57:
  /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc13/external/gcc/13.3.1-92b2d78dc343ed2bc93c8eb414ddc9ff/include/c++/13.3.1/bits/stl_algobase.h:437:30: error: 'void* __builtin_memmove(void*, const void*, long unsigned int)' offset [-9223372036854775803, -1] is out of the bounds [0, 4] of object '<anonymous>' with type 'const int [1]' [-Werror=array-bounds=]
   437 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
      |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/RecoEgamma/EgammaIsolationAlgos/src/ElectronTkIsolation.cc: In member function 'void ElectronTkIsolation::setAlgosToReject()':
src/RecoEgamma/EgammaIsolationAlgos/src/ElectronTkIsolation.cc:118:57: note: '<anonymous>' declared here
  118 |   algosToReject_ = {reco::TrackBase::jetCoreRegionalStep};
      |                                                         ^
cc1plus: some warnings being treated as errors
@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 30, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @gartung.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

makortel commented Feb 1, 2025

assign core

Looks the same as #47218

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 1, 2025

New categories assigned: core

@Dr15Jones,@makortel,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants