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

[GCC13] Avoid Wdangling-reference warning in CaloTPGTranscoderULUTs #45729

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

iarspider
Copy link
Contributor

PR description:

In GCC13 IB, compiler warns about a potentially dangling reference to a temporary:

  src/CalibCalorimetry/CaloTPG/plugins/CaloTPGTranscoderULUTs.cc:158:15: warning: possibly dangling reference to a temporary [-Wdangling-reference]
   158 |   const auto& topo = iRecord.getRecord<HcalLutMetadataRcd>().get(topoToken);
      |               ^~~~
src/CalibCalorimetry/CaloTPG/plugins/CaloTPGTranscoderULUTs.cc:158:65: note: the temporary was destroyed at the end of the full expression 'edm::eventsetup::DependentRecordImplementation<RecordT, ListT>::getRecord() const [with DepRecordT = HcalLutMetadataRcd; RecordT = CaloTPGRecord; ListT = edm::mpl::Vector<HcalLutMetadataRcd, CaloGeometryRecord>]().HcalLutMetadataRcd::<anonymous>.edm::eventsetup::DependentRecordImplementation<HcalLutMetadataRcd, edm::mpl::Vector<HcalRecNumberingRecord, IdealGeometryRecord> >::get<HcalTopology, HcalRecNumberingRecord>(((CaloTPGTranscoderULUTs*)this)->CaloTPGTranscoderULUTs::topoToken)'
  158 |   const auto& topo = iRecord.getRecord<HcalLutMetadataRcd>().get(topoToken);
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

Similar issues in the past were fixed by removing refence. I'm not sure if topo is cheap to copy, so I made the code explicitly store the result of getRecord.

PR validation:

Bot tests

@iarspider
Copy link
Contributor Author

please test for el9_amd64_gcc13

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 17, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @iarspider for master.

It involves the following packages:

  • CalibCalorimetry/CaloTPG (l1, alca)

@aloeliger, @consuegs, @epalencia, @perrotta, @saumyaphor4252 can you please review it and eventually sign? Thanks.
@ReyerBand, @mmusich, @rsreds, @thomreis, @tocheng, @wang0jin, @yuanchao this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7a2267/40984/summary.html
COMMIT: 3f0a9bb
CMSSW: CMSSW_14_1_X_2024-08-16-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45729/40984/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7a2267/40982/summary.html
COMMIT: 3f0a9bb
CMSSW: CMSSW_14_1_X_2024-08-16-2300/el9_amd64_gcc13
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45729/40982/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 262 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 61769 differences found in the comparisons
  • DQMHistoTests: Total files compared: 45
  • DQMHistoTests: Total histograms compared: 3422510
  • DQMHistoTests: Total failures: 364291
  • DQMHistoTests: Total nulls: 373
  • DQMHistoTests: Total successes: 3057826
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 5.620999999999999 KiB( 44 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): -0.544 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 13034.0 ): 2.776 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 140.043 ): -0.004 KiB JetMET/SUSYDQM
  • DQMHistoSizes: changed ( 250202.181 ): 0.234 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 25202.0 ): 0.719 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 7.3 ): 2.702 KiB SiStrip/MechanicalView
  • DQMHistoSizes: changed ( 8.0 ): -0.262 KiB SiStrip/MechanicalView
  • Checked 196 log files, 165 edm output root files, 45 DQM output files

@perrotta
Copy link
Contributor

+alca

@aloeliger
Copy link
Contributor

+l1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @rappoccio, @sextonkennedy, @antoniovilela, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

+1

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

Successfully merging this pull request may close these issues.

5 participants