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

Memory error when sorting an empty collection #194

Closed
Morwenn opened this issue Nov 15, 2021 · 0 comments
Closed

Memory error when sorting an empty collection #194

Morwenn opened this issue Nov 15, 2021 · 0 comments
Labels
Milestone

Comments

@Morwenn
Copy link
Owner

Morwenn commented Nov 15, 2021

ASAN and Valgrind catch memory errors when trying to sort an empty collection with merge_insertion_sort and slab_sort. They seem to be linked to fixed_size_list somehow. I need to investigate decide whether something needs to be done in fixed_size_list or whether it's the sorters that need to be fixed (and maybe whether to add an assertion in fixed_size_list).

@Morwenn Morwenn added the bug label Nov 15, 2021
Morwenn added a commit that referenced this issue Nov 17, 2021
merge_insertion_sort and slab_sort failed when sorting an empty
collection for the same reason: they tried to create an empty
fixed_size_list, which actually causes all knids of issues. The two
sorters don't attempt to creat such a list anymore, and an assertion was
added to the fixed_size_list constructor to ensure that it never
happens.
@Morwenn Morwenn added this to the 1.12.0 milestone Nov 17, 2021
@Morwenn Morwenn closed this as completed Nov 17, 2021
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