SEGV after FLANN's LSH index creation (Bug #2677)


Added by Rafal Kapela about 12 years ago. Updated about 12 years ago.


Status:Done Start date:2013-01-03
Priority:Normal Due date:
Assignee:Ilya Lysenkov % Done:

0%

Category:flann
Target version:2.4.4
Affected version:2.4.3 Operating System:
Difficulty: HW Platform:
Pull request:https://github.com/Itseez/opencv/pull/397

Description

I'm using FLAN with LSH as follows:
flann::LshIndexParams indexParams(20, 20, 0);
flann::Index lsh(descriptorsClusters, indexParams);

when <key_size> is much bigger than <table_number> (e.g., 100 in the above example) application throws a SEGV

In general application behaviuor with unusual index parameters is pretty unexpectable (I could even hang the whole system).


Associated revisions

Revision 098ea6fc
Added by Ilya Lysenkov about 12 years ago

Checked key_size in LSH table for validness (#2677)

Revision 06746ba6
Added by Alexander Alekhin almost 11 years ago

Merge pull request #2677 from ilya-lavrenov:ipp_compilation

History

Updated by Marius Muja about 12 years ago

Vincent, can you have a look at this? Thanks.

  • Assignee changed from Marius Muja to Vincent Rabaud

Updated by Vadim Pisarevsky about 12 years ago

let's try to fix it earlier

  • Affected version set to 2.4.3
  • Target version deleted (3.0)

Updated by Vadim Pisarevsky about 12 years ago

  • Assignee deleted (Vincent Rabaud)

Updated by Ilya Lysenkov about 12 years ago

  • Assignee set to Ilya Lysenkov

Updated by Ilya Lysenkov about 12 years ago

LshIndex can try to create an array with 2^key_size elements. So if you specify key_size = 100 then it fails to do that and throws a SEGV. Use smaller values (e.g. key_size < 30) and take into account that LshIndex can require a lot of memory for bigger values. A check for valid key_size was added in the pull request.

  • Pull request set to https://github.com/Itseez/opencv/pull/397

Updated by Andrey Kamaev about 12 years ago

Fix is pushed to 2.4

  • Status changed from Open to Done

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF