Skip to content

Conversation

jszuppe
Copy link
Contributor

@jszuppe jszuppe commented Apr 24, 2016

I've found out what's wrong in the find_end algorithm. Using uninitialized memory (from the end of matching_indices) was causing undefined behaviour. It was uninitialized because search_kernel does not initialize the last <pattern_size> - 1 elements of matching_indices as the pattern can not start there. Now it's fixed.

We have to use the same queue in the whole test.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 88.796% when pulling 701d607 on haahh:pr_fix_find_end into 48217d2 on boostorg:develop.

There was an uninitialized memory at the end of matching_indices
vector and it was read by detail::find_end_helper(...) function
resulting in wrong index returned by this function.
@kylelutz kylelutz merged commit 3c2bbbe into boostorg:develop Apr 26, 2016
@kylelutz
Copy link
Collaborator

Thanks for fixing this!

@jszuppe jszuppe deleted the pr_fix_find_end branch April 27, 2016 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants