flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.22k stars 647 forks source link

Fix stack-use-after-scope in any.h detected by asan #441

Open eklitzke opened 4 years ago

eklitzke commented 4 years ago

When calling get_param in util.h this bug causes a reference to be returned to an address on the stack.

isaactian commented 3 years ago

This bug pops up for me only when using optimization flags and it completely wrecks the flann neighbor search. Appears to corrupt the data structure in the flann matrix somehow but again only when -O(1, 2, 3) is enabled during compilation.