Ticket #9048 (closed: fixed)
small win bugs & Coverity code quality
Reported by: | Alex Buts | Owned by: | Alex Buts |
---|---|---|---|
Priority: | major | Milestone: | Release 3.2 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Nick Draper |
Description
Release with debug mode ticket has been broken and need fixing for windows profiling.
Coverity reports various errors in code I wrote -- most are not important but generate noise. Other look real -- this also should be dealt with.
Change History
comment:2 Changed 7 years ago by Alex Buts
- Status changed from assigned to inprogress
refs #9048 Fixing code which breaks Win comp in RelWithDebug mode
for Curve fitting though it can break Mac build in return.
Changeset: 40cd26017fbbe220446f6dea8aa07753ff36943e
comment:3 Changed 7 years ago by Alex Buts
refs #9048 should fix one of Coverity false alarms
Changeset: 76b9cbc533596a544543a644b7a74ccee986b6ba
comment:4 Changed 7 years ago by Alex Buts
refs #9048 Coverity warning CID 1075687
Changeset: f896dd898d86823419f4187d395e1d163fc4ba7d
comment:5 Changed 7 years ago by Alex Buts
refs #9048 fixing Coverity noise for CompareMDWorkspaces.cpp
Changeset: 6c1b1be85aa0f6e0b3ef7880fc8fd6214b098dfb
comment:6 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise in IMDEventWorkspace
https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11024017&defectInstanceId=3877305&mergedDefectId=528995 initialized m_FileNeedsUpdating, though I do not think it is necessary/used any more.
Changeset: efb7a6ae355cec33f7868895487ae187eb5d5d25
comment:7 Changed 7 years ago by Alex Buts
refs #9048 Trying to fix Coverity noise in ConvToMDSelector
do not understand what Coverity is complaining about -- default occurs if neither EventWS nor Matrix2D ws is provided (e.g. Table) Rewritten in a way which hopefully is more clear for Coverity
Changeset: a56df7928eb0c6240df6be7d30762a71c2ee5a99
comment:8 Changed 7 years ago by Alex Buts
refs #9048 Avoid unnecessary shared pointer increment
Changeset: f4c9f97385540130b7ff00305b9d22cac835b96b
comment:9 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise at SlicingAlgorithm
https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11027297&defectInstanceId=3877465&mergedDefectId=529167 clear noise -- it is initialized in the algorithm itself.
Changeset: 0bfed0d2ed54c006f6e004f3343c630da12c0fe4
comment:10 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise ? in CoordTransformAffine
It may be actually a real memory leak -- not sure how delete [] figures out the range of array it deallocates and it is not standardized. But the changes should make Coverity happy for very low price of additional pointer stored in the class.
Changeset: 25a4168b7381302b82fcd76215e2cae626b119d3
comment:11 Changed 7 years ago by Alex Buts
refs #9048 Ubuntu does not like this kind of default algorithm
, so need to get rid of it. Defaults are not used in its present form anyway.
Changeset: 2adf693f29dd9d387ed84f2e7c7cfaf0b0398a98
comment:12 Changed 7 years ago by Alex Buts
refs #9048 Fixing build
Changed form is actually used in the test but this can be moderated.
Changeset: 49f0867e4182c5a71ecdb0bd75ed000eab71915a
comment:13 Changed 7 years ago by Alex Buts
refs #9048 removed unused header from the BoxController.h
Changeset: de7723e6e754805494e46e0d54f90480b1ba468e
comment:14 Changed 7 years ago by Alex Buts
refs #9048 Coverity bug in ConvToMDEventsWS
https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11025021&defectInstanceId=3876993&mergedDefectId=528900 It looks like real resource leak, fixed by wrapping the thread scheduler into unique pointer.
Changeset: c01e8bb9f3a52745b23fb3b035199ab948067581
comment:15 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise
https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11025006&defectInstanceId=3877350&mergedDefectId=529173 uninitialized members in ConvToMDBase.cpp constructor.
Changeset: 95535df2c60ab28c7c531e31f731378c0b805252
comment:16 Changed 7 years ago by Alex Buts
refs #9048 Coverity bug?
https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11025833&defectInstanceId=3878261&mergedDefectId=528972 not sure if Coverity just mean in this case, but have just rewritten this function to accept missing experiment info entries. Do not think its logic is tested anywhere.
Changeset: 5e72cc6cd14ce5a677e0d00a0ad29ca5ba359c96
comment:17 Changed 7 years ago by Alex Buts
refs #9048 Coverity Noise
https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11026571&defectInstanceId=3877375&mergedDefectId=529159 for ConvertToDiffractionMDWorkspace
Changeset: cd56c55983ead96cafedefd423f0485e02ae2aed
comment:18 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise for MDTransfModQ
https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11026159&defectInstanceId=3877341&mergedDefectId=529178 just useless constructor initialization.
Changeset: 609e8f7e10e3188f77787eac88e1a5e69debaf05
comment:19 Changed 7 years ago by Alex Buts
refs #9048 COverity noise for MDTransfModQ.h
https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11026160&defectInstanceId=3876763&mergedDefectId=528801 do not understand this message and do not see any comma. Moved operation into from h to cpp in the hope to quiet this message.
Changeset: 56beb13e9339fc6e0ff41c362024effaafe2c4fb
comment:20 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise for UnitsConversionHelper
Changeset: a0483e0e9afb80c68d6070ba7a276e31bb03cd04
comment:21 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise for LoadMD.cpp
Changeset: 7e9d915e8c03239ff2aeda2e1eba49cf11e2e2e3
comment:22 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise for UnitsConversionHelper.cpp
Changeset: 1650dcfd99fddbfac6b429729754b6cf80a3651a
comment:23 Changed 7 years ago by Alex Buts
refs #9048 Coverity noise for MDEventsTestHelper.cpp
Changeset: bcb02d5c625d15d2accffd9df0a28ab1a1da9c6b
comment:24 Changed 7 years ago by Alex Buts
refs #9048 nasty conflict with develop
Merge branch 'bugfix/9048_smallWinBugs' into develop
Conflicts:
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp
Changeset: 4399e00fb418421fcedc487a1f224de91ca7819f
comment:25 Changed 7 years ago by Alex Buts
refs #9048 still lefower from merge conflict with develop.
Changeset: 3041c76ca454f588f72776fc51425bd0b775bc06
comment:26 Changed 7 years ago by Alex Buts
- Status changed from inprogress to verify
- Resolution set to fixed
I went through all code I am familiar with in Coverity and tried to fix all bugs it reports. Most of these bugs are noise (marked as noise at commits) but some worth minor refactoring. To see initial reports in Coverity by clicking on commit link you should be logged into Coverity.
Testing by code review only.
I have also fixed Release with debug information mode on Windows (first commit) rewriting the code which crashes Microsoft compiler in this mode. Can be tested on windows or just code reviewed to ensure that the results are as before (unit and system tests confirm so).
comment:27 Changed 7 years ago by Martyn Gigg
refs #9048 nasty conflict with develop
Merge branch 'bugfix/9048_smallWinBugs' into develop
Conflicts:
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp
Changeset: 3de64c67e3768b7790567192206a14840bcf220b
comment:28 Changed 7 years ago by Martyn Gigg
refs #9048 still lefower from merge conflict with develop.
Conflicts:
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp
Changeset: 0eeeb850ed36616872c0fd4390dcc7d39ce57508
comment:29 Changed 7 years ago by Martyn Gigg
- Status changed from verify to reopened
- Resolution fixed deleted
There are some compiler warnings related to fixes in MDTransfModQ. See here
comment:30 Changed 7 years ago by Alex Buts
- Status changed from reopened to inprogress
refs #9048 GCC warnings
Changeset: 53baf578459049085c0843577b39212ce1329907
comment:31 Changed 7 years ago by Alex Buts
refs #9048 Fixing conflict with develop
Merge branch 'bugfix/9048_smallWinBugs' into develop
Conflicts:
Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp
Changeset: aee6916e5b43d5cc4cff46008b17739f5dd2a9af
comment:32 Changed 7 years ago by Alex Buts
- Status changed from inprogress to verify
- Resolution set to fixed
comment:33 Changed 7 years ago by Nick Draper
- Status changed from verify to verifying
- Tester set to Nick Draper
comment:34 Changed 7 years ago by Nick Draper
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/9048_smallWinBugs'
Full changeset: c2fff94a55bd7437e94ee2d53ad8ec658604a44d
comment:35 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9891