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

Fix maybe-uninitialized warning in SeedingTrackFeatures #45152

Merged

Conversation

iarspider
Copy link
Contributor

@iarspider iarspider commented Jun 6, 2024

PR description:

(proper version of #45135)

Fixes the following warnings:

src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc: In function 'seedingTracksToFeatures':
  src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].pt' may be used uninitialized [-Wmaybe-uninitialized]
   216 |         btagbtvdeep::SeedingTrackFeatures seed_features_zeropad;
      |                                           ^
  src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].eta' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].phi' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].mass' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].dz' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].dxy' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].ip3D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].sip3D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].ip2D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].sip2D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].signedIp3D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].signedSip3D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].signedIp2D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].signedSip2D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].trackProbability3D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].trackProbability2D' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].chi2reduced' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].nPixelHits' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].nHits' may be used uninitialized [-Wmaybe-uninitialized]
   src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].jetAxisDistance' may be used uninitialized [-Wmaybe-uninitialized]
 In member function '__ct ',
    inlined from 'construct_at' at /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/stl_construct.h:97:14,
    inlined from 'construct' at /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/alloc_traits.h:518:21,
    inlined from 'push_back' at /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/stl_vector.h:1281:30,
    inlined from 'seedingTracksToFeatures' at src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:218:43:
  src/DataFormats/BTauReco/interface/SeedingTrackFeatures.h:9:9: warning: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].jetAxisDlength' may be used uninitialized [-Wmaybe-uninitialized]
     9 |   class SeedingTrackFeatures {
      |         ^
src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc: In function 'seedingTracksToFeatures':
src/RecoBTag/FeatureTools/src/SeedingTracksConverter.cc:216:43: note: 'MEM[(const struct SeedingTrackFeatures &)&seed_features_zeropad].jetAxisDlength' was declared here
  216 |         btagbtvdeep::SeedingTrackFeatures seed_features_zeropad;
      |                                           ^

PR validation:

Bot tests

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2024

cms-bot internal usage

@iarspider
Copy link
Contributor Author

please test for CMSSW_14_1_CPP20_X

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2024

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45152/40496

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2024

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

It involves the following packages:

  • RecoBTag/FeatureTools (reconstruction)

@jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks.
@missirol, @hqucms, @AlexDeMoor, @castaned, @Ming-Yan, @Senphy, @andrzejnovak, @demuller this is something you requested to watch as well.
@antoniovilela, @sextonkennedy, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2024

-1

Failed Tests: UnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-09d0ed/39743/summary.html
COMMIT: 83e3817
CMSSW: CMSSW_14_1_CPP20_X_2024-06-03-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45152/39743/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-09d0ed/39743/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-09d0ed/39743/git-merge-result

Unit Tests

I found 1 errors in the following unit tests:

---> test RecoPPSLocalNewT2 had ERRORS

Comparison Summary

Summary:

  • You potentially added 2427 lines to the logs
  • Reco comparison results: 131 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3338862
  • DQMHistoTests: Total failures: 908
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3337934
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 206.02399999999997 KiB( 47 files compared)
  • DQMHistoSizes: changed ( 12834.0,... ): 29.432 KiB HLT/EXO
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2024

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-09d0ed/39752/summary.html
COMMIT: 83e3817
CMSSW: CMSSW_14_1_X_2024-06-06-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45152/39752/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially added 1 lines to the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 48
  • DQMHistoTests: Total histograms compared: 3338974
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3338954
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 47 files compared)
  • Checked 202 log files, 165 edm output root files, 48 DQM output files
  • TriggerResults: no differences found

@jfernan2
Copy link
Contributor

jfernan2 commented Jun 6, 2024

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2024

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, @antoniovilela, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

@iarspider
Copy link
Contributor Author

@cms-sw/orp-l2 gentle ping

@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 9c25f67 into cms-sw:master Jun 12, 2024
16 of 17 checks passed
@iarspider iarspider deleted the iarspider-patch-iarspider-patch-20240606-1 branch June 21, 2024 07:09
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.

4 participants