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 append bug in DQMEventMessage #3574

Merged

Conversation

Dr15Jones
Copy link
Contributor

The previous code obviously thought ‘std::string subFolderName = “Subfolder “ + idx;’ was appending ‘idx’ to the string. That is not what was happening. Instead, pointer math was happening. So if ‘idx’ was 1 the resulting string was “ubfolder “. If ‘idx’ was 2 we got ‘bfolder ‘. If ‘idx’ was larger than the string length we would get random garbage.
This problem was found by clang.

The previous code obviously thought ‘std::string subFolderName = “Subfolder “ + idx;’ was appending ‘idx’ to the string. That is not what was happening. Instead, pointer math was happening. So if ‘idx’ was 1 the resulting string was “ubfolder “. If ‘idx’ was 2 we got ‘bfolder ‘. If ‘idx’ was larger than the string length we would get random garbage.
This problem was found by clang.
@cmsbuild
Copy link
Contributor

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

Fix append bug in DQMEventMessage

It involves the following packages:

IOPool/Streamer

@cmsbuild, @Degano, @Dr15Jones, @ktf, @nclopezo can you please review it and eventually sign? Thanks.
@wmtan 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.
@nclopezo, @ktf you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@Dr15Jones
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_1_X IBs unless changes or unless it breaks tests. @nclopezo, @ktf can you please take care of it?

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_1_X IBs unless changes (tests are also fine). @nclopezo, @ktf can you please take care of it?

nclopezo added a commit that referenced this pull request Apr 30, 2014
IOPool/Streamer -- Fix append bug in DQMEventMessage
@nclopezo nclopezo merged commit c0c20b3 into cms-sw:CMSSW_7_1_X Apr 30, 2014
@cmsbuild
Copy link
Contributor

@Dr15Jones Dr15Jones deleted the fixAppendBugInDQMEventMessage branch May 6, 2014 17:51
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

3 participants