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

Add asserts to avoid null pointer dereferences #2284

Merged
merged 1 commit into from Feb 4, 2014

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Feb 3, 2014

Recently, several relvals in the 7_1_X IB's have segfaulted in RootInputFileSequence::readOneSpecified().
That function dereferences a pointer without first checking for a null pointer.
This function adds an assert to that function, and to a few other functions in the same source file, to always check RootInputFileSequence::rootFile_, a pointer, for null before dereferencing it.
The segfaults are not reproducible, but this pull request may help solve the problem by checking for null pointer dereferences.
Some standardization of white space in the same file was also done, and one iterator loop was replaced by a C++11 range for loop.
range for loop.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 3, 2014

A new Pull Request was created by @wmtan for CMSSW_7_1_X.

Add asserts to avoid null pointer derefeences

It involves the following packages:

IOPool/Input

@cmsbuild, @Degano, @Dr15Jones, @ktf, @nclopezo can you please review it and eventually sign? Thanks.
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.
@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

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 3, 2014

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. @ktf can you please take care of it?

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 4, 2014

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 4, 2014

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). @ktf can you please take care of it?

ktf added a commit that referenced this pull request Feb 4, 2014
Framework cleanup -- Add asserts to avoid null pointer dereferences
@ktf ktf merged commit e858790 into cms-sw:CMSSW_7_1_X Feb 4, 2014
@nclopezo nclopezo modified the milestones: CMSSW_7_1_0_pre3, CMSSW_7_1_0_pre2 Feb 5, 2014
@wmtan wmtan deleted the AddAssertsToMaybeAvoidSegfaults branch February 12, 2014 17:15
@nclopezo nclopezo modified the milestones: CMSSW_7_1_0_pre4, CMSSW_7_1_0_pre3 Feb 24, 2014
@nclopezo nclopezo modified the milestones: CMSSW_7_1_0_pre5, CMSSW_7_1_0_pre4 Mar 10, 2014
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

5 participants