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

[CPP20] maybe-uninitialized warning in MeasurementTrackerImpl::addPhase2Det #42625

Closed
iarspider opened this issue Aug 22, 2023 · 4 comments · Fixed by #42880
Closed

[CPP20] maybe-uninitialized warning in MeasurementTrackerImpl::addPhase2Det #42625

iarspider opened this issue Aug 22, 2023 · 4 comments · Fixed by #42880

Comments

@iarspider
Copy link
Contributor

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 '_M_realloc_insert' at /data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/vector.tcc:462:28,
    inlined from 'emplace_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/vector.tcc:123: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:1294:21,
    inlined from 'addPhase2Det' at /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc:286:28,
    inlined from 'addDets' at /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc:236:23:
  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/RecoTracker/MeasurementDet/plugins/TkPhase2OTMeasurementDet.h:16:18: warning: 'MEM <unsigned long> [(unsigned int *)&D.14013 + 48B]' may be used uninitialized [-Wmaybe-uninitialized]
    16 | class dso_hidden TkPhase2OTMeasurementDet final : public MeasurementDet {
      |                  ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc: In member function 'addDets':
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/bde6290197b40a7abece5e0ce6f36880/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_13_3_CPP20_X_2023-08-21-1100/src/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc:286:80: note: '<anonymous>' declared here
  286 |     thePhase2Dets.push_back(TkPhase2OTMeasurementDet(gd, thePhase2DetConditions));
      |                                                                                ^
Leaving library rule at src/RecoTracker/MeasurementDet/plugins

Full log: https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/el8_amd64_gcc12/CMSSW_13_3_CPP20_X_2023-08-21-1100/RecoTracker/MeasurementDet

@cmsbuild
Copy link
Contributor

A new Issue was created by @iarspider .

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

cms-bot commands are listed here

@iarspider
Copy link
Contributor Author

assign reconstruction

@cmsbuild
Copy link
Contributor

New categories assigned: reconstruction

@clacaputo,@mandrenguyen you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor

If I interpret the MEM <unsigned long> [(unsigned int *)&D.14013 + 48B] part correctly, the warning refers to


(as sizeof(MeasurementDet) appears to be 48 bytes)

As far as I can tell, the id_ member is not used for anything, so it could be easily removed. But likely after that the LTO compilation would warn about


which is also not initialized in the constructor.

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

Successfully merging a pull request may close this issue.

3 participants