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 calling dtor on an abstract class with non-virtual dtor #15148
Conversation
A new Pull Request was created by @davidlt for CMSSW_8_1_X. It involves the following packages: TrackingTools/GeomPropagators @cmsbuild, @cvuosalo, @slava77, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
DEVEL IBs contain LLVM/Clang/LDD/RT/etc built from master branch to work on CMSSW + C++ Modules. So, to avoid undefined behaviour one can also probably add virtual dtor to the class. Up to the experts to decide how to resolve this. |
yes, HelixPlaneCrossing needs a virtual destructor... (It is pure virtual) |
63b4f08
to
0fa9ffd
Compare
Pull request #15148 was updated. @cmsbuild, @cvuosalo, @slava77, @davidlange6 can you please check and sign again. |
Updated with virtual dtor. |
@cmsbuild , please test |
The tests are being triggered in jenkins. |
Pull request #15148 was updated. @dmitrijus, @cvuosalo, @slava77, @vanbesien, @davidlange6 can you please check and sign again. |
sorry, in order to get the IB pages recognize latest IBs I had to amend the e495908 commit to have message like "Merge CMSSW_8_0_X into CMSSW_8_1_X.". Due to that now to old commit is shows as part of this PR. either ignore it (it is already part of IB) or please rebase based on CMSSW_8_1_X head. you can start from CMSSW_8_1_X and cherry pick the commits. |
Clang pre-3.9 fails with an error: In file included from src/TrackingTools/GeomPropagators/src/Aq:12: TrackingTools/GeomPropagators/interface/OptimalHelixPlaneCrossing.h:42:34: error: destructor called on 'HelixPlaneCrossing' that is abstract but has non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor] ~OptimalHelixPlaneCrossing() { get()->~Base(); } ^ src/TrackingTools/GeomPropagators/interface/OptimalHelixPlaneCrossing.h:42:41: note: qualify call to silence this warning ~OptimalHelixPlaneCrossing() { get()->~Base(); } ^ HelixPlaneCrossing:: 1 error generated. The changeset in Clang: http://reviews.llvm.org/D16206 Quote from C++ Standard used in this Clang changeset: C++ [expr.delete]p3: In the first alternative (delete object), if the static type of the object to be deleted is different from its dynamic type, the static type shall be a base class of the dynamic type of the object to be deleted and the static type shall have a virtual destructor or the behavior is undefined. Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
0fa9ffd
to
6319f5d
Compare
Pull request #15148 was updated. @cmsbuild, @cvuosalo, @slava77, @davidlange6 can you please check and sign again. |
@cmsbuild please test |
The tests are being triggered in jenkins. |
This pull request is fully signed and it will be integrated in one of the next CMSSW_8_1_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar |
+1 |
Clang pre-3.9 fails with an error:
The changeset in Clang: http://reviews.llvm.org/D16206
Quote from C++ Standard used in this Clang changeset:
Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch