BIC-MNI / minc-toolkit-v2

Version 2 of the minc-toolkit, uses tools based on ITK version 4.x
GNU General Public License v3.0
48 stars 21 forks source link

scan-build report from clang-3.7/llvm on develop as of 2015.11.29 #12

Open gdevenyi opened 8 years ago

gdevenyi commented 8 years ago

I was trolling the net and found that llvm/clang has a static analyzer (http://clang-analyzer.llvm.org/scan-build.html) which you can wrap any build with to get reports, so I decided to run it on minc-toolkt-v2

First, you'll be happy to know that minc-toolkit-v2 builds (and seems to run fine) using clang

Find the full report from llvm-3.7 on Ubuntu 15.10 at: https://dl.dropboxusercontent.com/u/307000/scan-build-minc-toolkit-v2-develop.tar.xz

To view, easiest is to use scan-view from the clang package on the unpacked directory (apt packages available here http://llvm.org/apt/ )

If I have some time I'll try and make some patches, in the meantime, hope you find these results useful.

@rdvincent I see a number of mentions of Display from a cursory viewing of the report

rdvincent commented 8 years ago

Thanks, I'll check it out sometime. Vlad occasionally checks the source against Coverity, which offers similar functionality.

gdevenyi commented 8 years ago

Yeah, I saw the Coverty report.

Since I was building the toolkit anyways for a reinstalled system I thought I'd get the scan results "for free"

vfonov commented 8 years ago

I looked at the report, found something interesting in ecattominc ( https://github.com/BIC-MNI/minc-tools/commit/381b3470499ca389985d15d5269a4e2041ec760b )

On the other hand this tool found some warnings in https://github.com/BIC-MNI/libminc/blob/develop/volume_io/Prog_utils/alloc_check.c , maybe it would be worth to completely remove that section of the code, since it is now superseded by address sanitizer or valgrind ?

andrewjanke commented 8 years ago

​I'm all for this part as I've never understood the need of this in volume_io

a ​

On 1 December 2015 at 03:12, Vladimir S. FONOV notifications@github.com wrote:

On the other hand this tool found some warnings in https://github.com/BIC-MNI/libminc/blob/develop/volume_io/Prog_utils/alloc_check.c , maybe it would be worth to completely remove that section of the code, since it is now superseded by address sanitizer or valgrind ?

fristed commented 8 years ago

I agree - it's no longer needed.

vfonov commented 8 years ago

Ok, I removed it here: https://github.com/BIC-MNI/libminc/commit/2c9fe6458dfee6da485180df90770aa633aeb78d , all tests pass so far ....