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 array overflow by ignoring the out-of-bounds value ... #9527

Merged
merged 1 commit into from Jun 11, 2015

Conversation

dmitrijus
Copy link
Contributor

... in Validation/EcalDigis.

Ignoring such values is ways better than modifying unrelated
variables on the stack.

Discussion: https://hypernews.cern.ch/HyperNews/CMS/get/swDevelopment/3202.html

…n/EcalDigis.

Ignoring such values is ways better than modifying unrelated
variables on the stack.
@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2015

A new Pull Request was created by @dmitrijus (Dmitrijus) for CMSSW_7_5_X.

Fixed array overflow by ignoring the out-of-bounds value ...

It involves the following packages:

Validation/EcalDigis

@cmsbuild, @danduggan, @deguio can you please review it and eventually sign? Thanks.
@argiro this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@deguio
Copy link
Contributor

deguio commented Jun 9, 2015

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2015

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 9, 2015

@deguio
Copy link
Contributor

deguio commented Jun 11, 2015

+1
@mengleisun please be aware of this.
thanks @dmitrijus
F.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs unless changes (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

} else {
// FindFixBin might return an overflow bin (outside tpEtCount range).
// To prevent a memory overflow / segfault, these values are ignored.
std::cout << "EcalSelectiveReadoutValidation: Invalid iE value: " << iE << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought, we shouldn't use std::cout. Shouldn't this be converted to message logger?

I see this is quite popular issue:

Begin processing the 88th record. Run 1, Event 7388, LumiSection 74 at 22-Jun-2015 15:37:19.177 CEST
EcalSelectiveReadoutValidation: Invalid iE value: 101
EcalSelectiveReadoutValidation: Invalid iE value: 101
EcalSelectiveReadoutValidation: Invalid iE value: 101
EcalSelectiveReadoutValidation: Invalid iE value: 101

@dmitrijus @deguio @Dr15Jones

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::cout is not allowed in code that is run in production.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've copied the std::cout code from a different location in the same file.
Point was to fix the error with least changes to the code and the code style.

I agree that we shouldn't use std::cout, but currently it's all over the code.
I will discuss it further and make a separate pull request(s) converting those.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. this one is has been merged anyway. :)

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

6 participants