[visit-developers] Quick look over

Miller, Mark C. miller86 at llnl.gov
Fri Feb 19 14:36:02 EST 2016


Hi All,

Thanks to several developers for taking a quick look at some of these.

That said, my goal is NOT to cause developers to have to adjust code merely to silence some useless warnings from a particular analysis tool.

For example, failure to check for null return from new/malloc before dereferencing is IMHO a worthless warning for VisIt. Why? Because the only situation where new/malloc return null is OOM. If we're in OOM, we have bigger issues anyways. VisIt is not currently coded to handle OOM conditions gracefully. And, even if VisIt proper is painstakenly adjusted to handle OOM gracefully, there is a good chance we could hit OOM in a TPL that does not handle it gracefully. Long story short, such a warning is not all that useful to us. So, adjusting code to silence Klocwork in that case is not a good use of time.

I assume there are probably many other situations with a similar outcome.

I say this to urge developers to complain if anything they see seems not too useful to be bothered with.

As always, if the warnings are useful and lead to useful changes to code, that is great.

I am still trying to figure out best way to handle this long term so that analysis tools are easily accessible to all developers. Not sure that will be possible with this particular tool anyways.

Mark


From: "Miller, Mark C." <miller86 at llnl.gov<mailto:miller86 at llnl.gov>>
Date: Friday, February 19, 2016 9:54 AM
To: "visit-developers at elist.ornl.gov<mailto:visit-developers at elist.ornl.gov>" <visit-developers at elist.ornl.gov<mailto:visit-developers at elist.ornl.gov>>
Subject: Quick look over

Below is a somewhat cryptic list of recent issues that got committed to the trunk that the  Klocwork atatic analyzer found.

I would like to ask if relevant developers might be able to scan this list, perhaps look at relevant code blocks and give a thumbs up or down as to whether the identified issue might be real or not.

Don't spend vary much time. Just a quick look and if anything jumps out, great.

I need to work to find the right long term solution to making this data available, including access to actual analysis results.

Mark


From: "Michael H. Chang" <chang28 at llnl.gov<mailto:chang28 at llnl.gov>>
Date: Thursday, February 18, 2016 1:22 PM
To: "Miller, Mark C." <miller86 at llnl.gov<mailto:miller86 at llnl.gov>>, "Chang, Michael H." <chang28 at llnl.gov<mailto:chang28 at llnl.gov>>
Subject: VisIt build result

There are 36 new issues.
[70065] 'bbox.z' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/plots/Volume/avtOpenGL3DTextureVolumeRenderer.C | Render
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70065,project=VisIt,searchquery=state:new
[70066] 'bbox.x' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/plots/Volume/avtOpenGL3DTextureVolumeRenderer.C | Render
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70066,project=VisIt,searchquery=state:new
[70067] 'derivatives' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/avt/MIR/Youngs/CellInterfaceTools2D.h | findTriangleSetCuttingPlane
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70067,project=VisIt,searchquery=state:new
[70068] 'cell.vfs' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/avt/MIR/Zoo/RecursiveCellReconstructor.C | ReconstructCell
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70068,project=VisIt,searchquery=state:new
[70069] Object 'filename' was used at line 283 after being freed by calling 'delete[]' at line 282
/nfs/tmp2/chang28/visit/build/src/databases/VTK/avtVTKFileReader.C | ~avtVTKFileReader
Code UFM.USE.MUST | Severity: Error(2) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70069,project=VisIt,searchquery=state:new
[70070] Array '&lrays' of size 4 may use index value(s) 4..7
/nfs/tmp2/chang28/visit/build/src/databases/GMV/gmvread.c | readrays
Code ABV.GENERAL | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70070,project=VisIt,searchquery=state:new
[70071] 'newCoord.weight' array elements might be used uninitialized in this function. Also there are 2 similar errors on lines 391, 405.
/nfs/tmp2/chang28/visit/build/src/avt/MIR/Zoo/CellReconstructor.C | CreateOutputShape
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70071,project=VisIt,searchquery=state:new
[70072] Width is not specified for 's' conversion specifier. This can result in an overflow of the buffer provided in argument 4 of a call to 'sscanf'. Also there is one similar error on line 1276.
/nfs/tmp2/chang28/visit/build/src/gui/QvisSimulationWindow.C | UpdateWindow
Code SV.FMT_STR.BAD_SCAN_FORMAT | Severity: Error(2) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70072,project=VisIt,searchquery=state:new
[70073] Possible memory leak. Dynamic memory stored in 'obj.value' allocated through function 'object_lineparse' at line 547 can be lost at line 547. Also there is one similar error on line 596.
/nfs/tmp2/chang28/visit/build/src/databases/DDCMD/object.C | object_compileSectionedFile
Code MLK.MIGHT | Severity: Error(2) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70073,project=VisIt,searchquery=state:new
[70074] 'derivatives' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/avt/MIR/Youngs/CellInterfaceTools2D_Axis.h | findTriangleSetCuttingCone
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70074,project=VisIt,searchquery=state:new
[70075] 'cell.localids' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/avt/MIR/Zoo/RecursiveCellReconstructor.C | ReconstructCell
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70075,project=VisIt,searchquery=state:new
[70076] Suspicious dereference of pointer 'point_counts' before NULL check at line 1151
/nfs/tmp2/chang28/visit/build/src/operators/LCS/avtLCSFilterFTLE.C | RectilinearGridSingleCalc
Code RNPD.DEREF | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70076,project=VisIt,searchquery=state:new
[70077] Pointer 'this->mm5file' returned from call to function 'Initialize' at line 357 may be NULL and may be dereferenced at line 417.
/nfs/tmp2/chang28/visit/build/src/databases/MM5/avtMM5FileFormat.C | GetMesh
Code NPD.FUNC.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70077,project=VisIt,searchquery=state:new
[70078] Pointer 'GetRootNode()' returned from call to function 'GetRootNode' at line 785 may be NULL and will be dereferenced at line 785.
/nfs/tmp2/chang28/visit/build/src/gui/MovieTemplateConfig.C | GetActiveViewport
Code NPD.FUNC.MUST | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70078,project=VisIt,searchquery=state:new
[70079] Array 'buf' of size 'len*1' may use index value(s) 0..min(6,len-1)
/nfs/tmp2/chang28/visit/build/src/visitpy/common/visitmodule.C | visit_exec_client_method
Code ABV.GENERAL | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70079,project=VisIt,searchquery=state:new
[70080] Null pointer 'normals' that comes from line 2651 may be dereferenced at line 3079. Also there is one similar error on line 3094.
/nfs/tmp2/chang28/visit/build/src/operators/IntegralCurve/avtIntegralCurveFilter.C | CreateIntegralCurveOutput
Code NPD.GEN.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70080,project=VisIt,searchquery=state:new
[70081] Pointer 'GetRootNode()' returned from call to function 'GetRootNode' at line 749 may be NULL and will be dereferenced at line 749.
/nfs/tmp2/chang28/visit/build/src/gui/MovieTemplateConfig.C | GetViewport
Code NPD.FUNC.MUST | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70081,project=VisIt,searchquery=state:new
[70082] Array 'textString' of size '(len+1)*1' may use index value(s) 0..min(1,len-1). Also there is one similar error on line 735.
/nfs/tmp2/chang28/visit/build/src/avt/VisWindow/Colleagues/avtText3DColleague.C | SetText
Code ABV.GENERAL | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70082,project=VisIt,searchquery=state:new
[70083] Pointer 'GetRootNode()' returned from call to function 'GetRootNode' at line 1027 may be NULL and will be dereferenced at line 1027.
/nfs/tmp2/chang28/visit/build/src/gui/MovieTemplateConfig.C | ViewportAdd
Code NPD.FUNC.MUST | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70083,project=VisIt,searchquery=state:new
[70084] Pointer 'GetRootNode()' returned from call to function 'GetRootNode' at line 824 may be NULL and will be dereferenced at line 824.
/nfs/tmp2/chang28/visit/build/src/gui/MovieTemplateConfig.C | GetNumberOfViewports
Code NPD.FUNC.MUST | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70084,project=VisIt,searchquery=state:new
[70085] 'newCoord.weight' array elements might be used uninitialized in this function. Also there are 4 similar errors on lines 182, 194, 210, 242.
/nfs/tmp2/chang28/visit/build/src/avt/MIR/Zoo/CellReconstructor.C | CreateCentroidPoint
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70085,project=VisIt,searchquery=state:new
[70086] 'derivatives' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/avt/MIR/Youngs/CellInterfaceTools3D.h | findTetraSetCuttingPlane
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70086,project=VisIt,searchquery=state:new
[70087] Array 'textString' of size 'len*1' may use index value(s) 0..min(10,len-1)
/nfs/tmp2/chang28/visit/build/src/avt/VisWindow/Colleagues/avtTimeSliderColleague.C | SetText
Code ABV.GENERAL | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70087,project=VisIt,searchquery=state:new
[70088] Pointer 'GetRootNode()' returned from call to function 'GetRootNode' at line 945 may be NULL and will be dereferenced at line 945.
/nfs/tmp2/chang28/visit/build/src/gui/MovieTemplateConfig.C | ViewportGetNameForIndex
Code NPD.FUNC.MUST | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70088,project=VisIt,searchquery=state:new
[70089] Suspicious dereference of pointer 'index_counts' before NULL check at line 1145
/nfs/tmp2/chang28/visit/build/src/operators/LCS/avtLCSFilterFTLE.C | RectilinearGridSingleCalc
Code RNPD.DEREF | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70089,project=VisIt,searchquery=state:new
[70090] Array '&lrayvars' of size 4 may use index value(s) 4..7
/nfs/tmp2/chang28/visit/build/src/databases/GMV/gmvread.c | readrays
Code ABV.GENERAL | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70090,project=VisIt,searchquery=state:new
[70091] Suspicious dereference of pointer 'point_counts' before NULL check at line 799
/nfs/tmp2/chang28/visit/build/src/operators/LCS/avtLCSFilterFSLE.C | RectilinearGridIterativeCalc
Code RNPD.DEREF | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70091,project=VisIt,searchquery=state:new
[70092] Array 'textString' of size 'len*1' may use index value(s) 0..min(1,len-1). Also there is one similar error on line 575.
/nfs/tmp2/chang28/visit/build/src/avt/VisWindow/Colleagues/avtText2DColleague.C | SetText
Code ABV.GENERAL | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70092,project=VisIt,searchquery=state:new
[70093] Pointer 'GetRootNode()' returned from call to function 'GetRootNode' at line 1093 may be NULL and will be dereferenced at line 1093.
/nfs/tmp2/chang28/visit/build/src/gui/MovieTemplateConfig.C | ViewportRemove
Code NPD.FUNC.MUST | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70093,project=VisIt,searchquery=state:new
[70094] 'cell.ids' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/avt/MIR/Zoo/RecursiveCellReconstructor.C | ReconstructCell
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70094,project=VisIt,searchquery=state:new
[70095] Pointer 'GetRootNode()' returned from call to function 'GetRootNode' at line 896 may be NULL and will be dereferenced at line 896.
/nfs/tmp2/chang28/visit/build/src/gui/MovieTemplateConfig.C | ViewportGetIndexForName
Code NPD.FUNC.MUST | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70095,project=VisIt,searchquery=state:new
[70096] Possible memory leak. Dynamic memory stored in 'obj._class' allocated through function 'object_lineparse' at line 547 can be lost at line 547. Also there is one similar error on line 596.
/nfs/tmp2/chang28/visit/build/src/databases/DDCMD/object.C | object_compileSectionedFile
Code MLK.MIGHT | Severity: Error(2) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70096,project=VisIt,searchquery=state:new
[70097] Suspicious dereference of pointer 'time_counts' before NULL check at line 802
/nfs/tmp2/chang28/visit/build/src/operators/LCS/avtLCSFilterFSLE.C | RectilinearGridIterativeCalc
Code RNPD.DEREF | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70097,project=VisIt,searchquery=state:new
[70098] 'bbox.y' array elements might be used uninitialized in this function.
/nfs/tmp2/chang28/visit/build/src/plots/Volume/avtOpenGL3DTextureVolumeRenderer.C | Render
Code UNINIT.STACK.ARRAY.MIGHT | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70098,project=VisIt,searchquery=state:new
[70099] Suspicious dereference of pointer 'index_counts' before NULL check at line 796
/nfs/tmp2/chang28/visit/build/src/operators/LCS/avtLCSFilterFSLE.C | RectilinearGridIterativeCalc
Code RNPD.DEREF | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70099,project=VisIt,searchquery=state:new
[70100] Pointer 'GetRootNode()' returned from call to function 'GetRootNode' at line 1142 may be NULL and will be dereferenced at line 1142.
/nfs/tmp2/chang28/visit/build/src/gui/MovieTemplateConfig.C | ViewportRemoveAll
Code NPD.FUNC.MUST | Severity: Critical(1) | State: New | Status: Analyze | Taxonomy: C and C++ | Created: Thu Feb 18 13:17:12 2016
https://rzcereal3.llnl.gov:8066/review/insight-review.html#issuedetails_goto:problemid=70100,project=VisIt,searchquery=state:new


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://elist.ornl.gov/pipermail/visit-developers/attachments/20160219/9e72b4aa/attachment.html>


More information about the visit-developers mailing list