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

Prevent segfault if dd4hep::Solid is not valid #28623

Merged
merged 1 commit into from Dec 14, 2019

Conversation

cvuosalo
Copy link
Contributor

PR description:

A test script for reading geometry XML files terminated with a segmentation fault when it created an incomplete dd4hep::Solid object and then tried to output the Solid::name() in a debug statement. This dd4hep::Solid::name() method tries to de-reference a null pointer, causing a segfault, when the object is invalid.
To fix this problem, a call to Solid::isValid() is added to ensure that the object is valid before trying to get its name.
The DD4hep team will be changing the behavior of Solid::name() to raising an exception instead of segfaulting in the case of an invalid object, but the approach in this PR of checking for validity is our preferred solution to the problem

PR validation:

The script with the segfault was tested with this fix to ensure that the bug is gone. This fix should not change any standard workflows.

No backport needed.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28623/13155

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @cvuosalo (Carl Vuosalo) for master.

It involves the following packages:

DetectorDescription/DDCMS

@civanch, @Dr15Jones, @cvuosalo, @ianna, @mdhildreth, @cmsbuild can you please review it and eventually sign? Thanks.
@vargasa 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

@cvuosalo
Copy link
Contributor Author

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 13, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/3969/console Started: 2019/12/13 21:38

@cmsbuild
Copy link
Contributor

+1
Tested at: 3f87ce2
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9155d1/3969/summary.html
CMSSW: CMSSW_11_1_X_2019-12-13-1100
SCRAM_ARCH: slc7_amd64_gcc820

@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-9155d1/3969/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2798405
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2798063
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@cvuosalo
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 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

+1

@cmsbuild cmsbuild merged commit 78e6c64 into cms-sw:master Dec 14, 2019
@cvuosalo
Copy link
Contributor Author

@slomeo FYI, the segmentation fault in the script testGeometry2026D49.py is fixed by this PR, which has just been merged.

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