Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-bound access in merge_insertion_sorter #182

Closed
Morwenn opened this issue Feb 3, 2021 · 1 comment
Closed

Out-of-bound access in merge_insertion_sorter #182

Morwenn opened this issue Feb 3, 2021 · 1 comment
Labels
Milestone

Comments

@Morwenn
Copy link
Owner

Morwenn commented Feb 3, 2021

When running the test suite with MSVC in Debug mode, some merge_insertion_sorter tests failed because of the creation of out-of-bounds iterators. A few more errors were segfaults but might be related to the same problems.

1 - test every instantiated sorter (SEGFAULT)
10 - test every random-access sorter with vector - cppsort::merge_insertion_sorter (Failed)
32 - test every random-access sorter with deque - cppsort::merge_insertion_sorter (Failed)
64 - test every sorter with a pointer to member function comparison - cppsort::merge_insertion_sorter (SEGFAULT)
85 - test every sorter with long std::string - cppsort::merge_insertion_sorter (Failed)
106 - every sorter with comparison function altered by move - cppsort::merge_insertion_sorter (Failed)
126 - every sorter with projection function altered by move - cppsort::merge_insertion_sorter (Failed)
147 - test every sorter with move-only types - cppsort::merge_insertion_sorter (Failed)
167 - test most sorters with no_post_iterator - cppsort::merge_insertion_sorter (SEGFAULT)
189 - test extended compatibility with LWG 3031 - cppsort::merge_insertion_sorter (Failed)
211 - test every sorter with temporary span - cppsort::merge_insertion_sorter (Failed)
386 - every sorter with verge_adapter - cppsort::merge_insertion_sorter (Failed)
704 - merge_insertion_sorter tests with projections (SEGFAULT)
@Morwenn Morwenn added the bug label Feb 3, 2021
@Morwenn Morwenn added this to the 1.10.0 milestone Feb 15, 2021
@Morwenn
Copy link
Owner Author

Morwenn commented Feb 15, 2021

The out-of-bounds iterator issue is fixed, but now merge_insertion_sort segfaults with all of the tests above. It seems to be a different issue, so I've opened #184 as a followup.

@Morwenn Morwenn closed this as completed Feb 15, 2021
Morwenn added a commit that referenced this issue Mar 5, 2021
This is directly linked to #182: the previous resolution made the tests
pass but was incomplete. The new resolution tries to generally simplify
the related bits of the algorithm and should cover the possible
out-of-bounds issues better.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant