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

DetectorDescription Clang Crash Bug Fix #20002

Merged
merged 2 commits into from Aug 2, 2017

Conversation

ianna
Copy link
Contributor

@ianna ianna commented Aug 1, 2017

  • Avoid using temporary references which are cleaned up by clang meticulously

@Dr15Jones and @smuzaffar - FYI

@ianna
Copy link
Contributor Author

ianna commented Aug 1, 2017

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2017

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2017

A new Pull Request was created by @ianna (Ianna Osborne) for master.

It involves the following packages:

DetectorDescription/Core
DetectorDescription/Parser

@cmsbuild, @civanch, @Dr15Jones, @ianna, @mdhildreth can you please review it and eventually sign? Thanks.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@@ -16,6 +16,9 @@ std::ostream & operator<<(std::ostream &, const DDRotation &);
DDRotation DDrot(const DDName & name,
DDRotationMatrix * rot);

DDRotation * DDrotPtr(const DDName & name,
Copy link
Contributor

Choose a reason for hiding this comment

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

How about returing a std::unique_ptr<DDRotation> instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I have much more then that :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, but as this stands, is this a memory leak?

@ianna
Copy link
Contributor Author

ianna commented Aug 1, 2017

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/21978/console Started: 2017/08/01 18:57

@ianna
Copy link
Contributor Author

ianna commented Aug 1, 2017

type bugfix

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2017

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2017

Comparison job queued.

@ianna
Copy link
Contributor Author

ianna commented Aug 1, 2017

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2017

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

@Dr15Jones
Copy link
Contributor

This was not a case of clang doing something 'wrong'. The previous code was always wrong since by the C++ standard the object is always deleted at the end of its scope. The pointer in question was always pointing to deleted memory. What probably happened with clang is clang decided to re-use that space on the stack where the object used to be while gcc probably was using additional space on the stack.

The new code does the right thing.

@ianna
Copy link
Contributor Author

ianna commented Aug 1, 2017

I agree, the code was not up to the standard - we would have hit this problem at some point with gcc.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 2, 2017

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 25
  • DQMHistoTests: Total histograms compared: 2651091
  • DQMHistoTests: Total failures: 60968
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2589942
  • DQMHistoTests: Total skipped: 181
  • DQMHistoTests: Total Missing objects: 0
  • Checked 102 log files, 14 edm output root files, 25 DQM output files

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 34733bb into cms-sw:master Aug 2, 2017
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