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

Fixed possible buffer overflow in CSCTriggerPrimitivesReader #25800

Merged
merged 1 commit into from Feb 8, 2019

Conversation

Dr15Jones
Copy link
Contributor

This was spotted when building with ASAN.

This was spotted when building with ASAN.
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@Dr15Jones
Copy link
Contributor Author

This fixes the build errors in ASAN and TSAN IBs. E.g.

  /build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: error: '%d' directive writing between 1 and 10 bytes into a region of size 5 [-Werror=format-overflow=]
  void CSCTriggerPrimitivesReader::drawCompHistos() {
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: note: directive argument in the range [1, 2147483647]
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3559:12: note: 'sprintf' output between 6 and 15 bytes into a destination of size 7
     sprintf(pagenum, "- %d -", page);  t.DrawText(0.9, 0.02, pagenum);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  /build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: error: '%d' directive writing between 1 and 10 bytes into a region of size 5 [-Werror=format-overflow=]
  void CSCTriggerPrimitivesReader::drawCompHistos() {
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: note: directive argument in the range [1, 2147483647]
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3611:12: note: 'sprintf' output between 6 and 15 bytes into a destination of size 7
     sprintf(pagenum, "- %d -", page);  t.DrawText(0.9, 0.02, pagenum);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  /build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: error: '%d' directive writing between 1 and 10 bytes into a region of size 5 [-Werror=format-overflow=]
  void CSCTriggerPrimitivesReader::drawCompHistos() {
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: note: directive argument in the range [1, 2147483647]
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3662:12: note: 'sprintf' output between 6 and 15 bytes into a destination of size 7
     sprintf(pagenum, "- %d -", page);  t.DrawText(0.9, 0.02, pagenum);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  /build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: error: '%d' directive writing between 1 and 10 bytes into a region of size 5 [-Werror=format-overflow=]
  void CSCTriggerPrimitivesReader::drawCompHistos() {
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: note: directive argument in the range [1, 2147483647]
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3714:12: note: 'sprintf' output between 6 and 15 bytes into a destination of size 7
     sprintf(pagenum, "- %d -", page);  t.DrawText(0.9, 0.02, pagenum);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  /build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: error: '%d' directive writing between 1 and 10 bytes into a region of size 5 [-Werror=format-overflow=]
  void CSCTriggerPrimitivesReader::drawCompHistos() {
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3476:6: note: directive argument in the range [1, 2147483647]
/build/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/a15cec9e1aeb53dd2aadac15d97bfeab/opt/cmssw/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_5_TSAN_X_2019-01-25-2300/src/L1Trigger/CSCTriggerPrimitives/test/CSCTriggerPrimitivesReader.cc:3765:12: note: 'sprintf' output between 6 and 15 bytes into a destination of size 7
     sprintf(pagenum, "- %d -", page);  t.DrawText(0.9, 0.02, pagenum);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25800/8234

  • This PR adds an extra 40KB to repository

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 30, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32904/console Started: 2019/01/30 18:00

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

L1Trigger/CSCTriggerPrimitives

@nsmith-, @rekovic, @cmsbuild can you please review it and eventually sign? Thanks.
@valuev, @Martin-Grunewald, @ptcox, @dildick this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-25800/32904/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3097440
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3097242
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@Dr15Jones
Copy link
Contributor Author

ping

@fabiocos
Copy link
Contributor

fabiocos commented Feb 5, 2019

@rekovic this is a small fix, could you please check and sign or comment?

@rekovic
Copy link
Contributor

rekovic commented Feb 8, 2019

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

fabiocos commented Feb 8, 2019

+1

@cmsbuild cmsbuild merged commit a2c9e87 into cms-sw:master Feb 8, 2019
@Dr15Jones Dr15Jones deleted the fixCSCTriggerPrimitivesReader branch February 9, 2019 22:36
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.

None yet

4 participants