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

[GCC 11] Fix error "array subscript outside array bounds" #34757

Merged
merged 1 commit into from
Aug 10, 2021
Merged

[GCC 11] Fix error "array subscript outside array bounds" #34757

merged 1 commit into from
Aug 10, 2021

Commits on Aug 4, 2021

  1. Fix error "array subscript outside array bounds"

    Log file: https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/slc7_amd64_gcc11/CMSSW_12_1_X_2021-07-30-0900/CondCore/EcalPlugins
    Error message:
    ```
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc: In member function 'virtual bool {anonymous}::EcalFloatCondObjectContainerPlot::fill(const std::vector<std::tuple<long long unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)':
      /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:120:17: error: array subscript 1 is outside array bounds of 'TPad* [1]' [-Werror=array-bounds]
       120 |       pad[1]->cd();
          |       ~~~~~~~~~~^~
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:112:28: note: referencing an object of size 8 allocated by 'void* operator new(std::size_t)'
      112 |       TPad** pad = new TPad*;
          |                            ^
      /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:122:17: error: array subscript 2 is outside array bounds of 'TPad* [1]' [-Werror=array-bounds]
       122 |       pad[2]->cd();
          |       ~~~~~~~~~~^~
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:112:28: note: referencing an object of size 8 allocated by 'void* operator new(std::size_t)'
      112 |       TPad** pad = new TPad*;
          |                            ^
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc: In member function 'bool {anonymous}::EcalFloatCondObjectContainerDiffBase<nIOVs, ntags>::fill() [with cond::payloadInspector::IOVMultiplicity nIOVs = cond::payloadInspector::SINGLE_IOV; int ntags = 1]':
      /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:273:17: error: array subscript 1 is outside array bounds of 'TPad* [1]' [-Werror=array-bounds]
       273 |       pad[1]->cd();
          |       ~~~~~~~~~~^~
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:265:20: note: referencing an object of size 8 allocated by 'void* operator new(std::size_t)'
      265 |       TPad** pad = new TPad*;
          |                    ^~~~~~~~~
      /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:275:17: error: array subscript 2 is outside array bounds of 'TPad* [1]' [-Werror=array-bounds]
       275 |       pad[2]->cd();
          |       ~~~~~~~~~~^~
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:265:20: note: referencing an object of size 8 allocated by 'void* operator new(std::size_t)'
      265 |       TPad** pad = new TPad*;
          |                    ^~~~~~~~~
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc: In member function 'bool {anonymous}::EcalFloatCondObjectContainerDiffBase<nIOVs, ntags>::fill() [with cond::payloadInspector::IOVMultiplicity nIOVs = cond::payloadInspector::SINGLE_IOV; int ntags = 2]':
      /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:273:17: error: array subscript 1 is outside array bounds of 'TPad* [1]' [-Werror=array-bounds]
       273 |       pad[1]->cd();
          |       ~~~~~~~~~~^~
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:265:20: note: referencing an object of size 8 allocated by 'void* operator new(std::size_t)'
      265 |       TPad** pad = new TPad*;
          |                    ^~~~~~~~~
      /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:275:17: error: array subscript 2 is outside array bounds of 'TPad* [1]' [-Werror=array-bounds]
       275 |       pad[2]->cd();
          |       ~~~~~~~~~~^~
    /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/3f7c5ca595fd8634b26b919adc27f210/opt/cmssw/slc7_amd64_gcc11/cms/cmssw/CMSSW_12_1_X_2021-07-30-0900/src/CondCore/EcalPlugins/plugins/EcalFloatCondObjectContainer_PayloadInspector.cc:265:20: note: referencing an object of size 8 allocated by 'void* operator new(std::size_t)'
      265 |       TPad** pad = new TPad*;
          |                    ^~~~~~~~~
    ```
    iarspider authored Aug 4, 2021
    Configuration menu
    Copy the full SHA
    e9a5cb6 View commit details
    Browse the repository at this point in the history