Ask Your Question

MysteriousBugOracle's profile - activity

2017-09-04 05:34:12 -0600 marked best answer is this code in modules/flann/src/miniflann.cpp a bug?

Using an experimental new static analysis technique we (GrammaTech) detected what may be a bug in createIndicesDists, miniflann.cpp:

static void createIndicesDists(OutputArray _indices, OutputArray _dists, 
                                       Mat& indices, Mat& dists, int rows, 
                                       int minCols, int maxCols, int dtype) 
        { 
            if( _indices.needed() ) 
            { 
                indices = _indices.getMat(); 
                if( !indices.isContinuous() || indices.type() != CV_32S || 
                    indices.rows != rows || indices.cols < minCols || indices.cols > maxCols ) 
                { 
                    if( !indices.isContinuous() ) 
                       _indices.release(); 
                    _indices.create( rows, minCols, CV_32S ); 
                    indices = _indices.getMat(); 
                } 
            } 
            else 
                indices.create( rows, minCols, CV_32S ); 

            if( _dists.needed() ) 
            { 
                dists = _dists.getMat(); 
                if( !dists.isContinuous() || dists.type() != dtype || 
                   dists.rows != rows || dists.cols < minCols || dists.cols > maxCols ) 
                { 
                    if( !indices.isContinuous() ) // HERE!  should this be 'dists'?
                        _dists.release(); 
                    _dists.create( rows, minCols, dtype ); 
                    dists = _dists.getMat(); 
                } 
            } 
            else 
                dists.create( rows, minCols, dtype ); 
        }

The block of code operating on _dists/dists appears to be a copy of the above block operating on _indices/indices, with all of the occurrences of _indices/indices changed to _dists/dists except the one noted in the "HERE!" comment. This inconsistency couid be intentional, but it is highly suspicious. Can anyone "in the know" confirm or deny that this is a bug?

2017-09-04 05:33:30 -0600 received badge  Teacher (source)
2017-09-04 00:54:13 -0600 received badge  Self-Learner (source)
2017-09-03 17:48:51 -0600 answered a question Possible bug in modules/highgui/src/window_gtk.cpp

Factoring? // a couple of suitable typedefs... static void cvImageWidget_get_preferred_dimension (Gtk

2017-09-03 17:33:15 -0600 received badge  Self-Learner (source)
2017-09-03 17:29:38 -0600 answered a question is this code in modules/flann/src/miniflann.cpp a bug?

This could have been avoided by a little factoring, as follows: // there might be a better name for this... static void

2017-09-03 13:50:39 -0600 commented question is this code in modules/flann/src/miniflann.cpp a bug?

Do I need to create another separate account for your bug tracking system, or does the one used for this site cover both

2017-09-02 18:58:33 -0600 commented question Possible bug in modules/calib3d/test/test_stereomatching.cpp?

We don't actually use this code, so we're not in a position to create or test a fix. We just run our static analysis to

2017-09-01 17:38:40 -0600 asked a question Possible bug in modules/calib3d/test/test_stereomatching.cpp?

Possible bug in modules/calib3d/test/test_stereomatching.cpp? Using an experimental new analysis technique, we (GrammaTe

2017-09-01 16:37:47 -0600 asked a question Possible bug in modules/highgui/src/window_gtk.cpp

Possible bug in modules/highgui/src/window_gtk.cpp Using an experimental new static analysis technique, we (GrammaTech)

2017-09-01 16:32:48 -0600 received badge  Student (source)
2017-09-01 16:15:55 -0600 asked a question is this code in modules/flann/src/miniflann.cpp a bug?

is this code in modules/flann/src/miniflann.cpp a bug? Using an experimental new static analysis technique we (GrammaTec