SEGV after FLANN's LSH index creation (Bug #2677)
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
Checked key_size in LSH table for validness (#2677)
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 Kirill Kornyakov about 12 years ago
- Target version set to 2.4.4