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

[BUG] timsort - std::bad_array_new_length #2687

Closed
Jxtopher opened this issue Apr 5, 2024 · 2 comments · May be fixed by #2692
Closed

[BUG] timsort - std::bad_array_new_length #2687

Jxtopher opened this issue Apr 5, 2024 · 2 comments · May be fixed by #2692
Labels
bug stale Author has not responded to the comments for over 2 weeks

Comments

@Jxtopher
Copy link
Contributor

Jxtopher commented Apr 5, 2024

Description

Hello all,

For sorting/tim_sort.cpp
An exception is thrown: std::bad_array_new_length, when you run this piece of code:

void test(int size) {
    std::cout<<"Try for "<<size<<std::endl;
    int *arr = new int[size];
    for (uint i = 0 ; i < size ; i++) {
        arr[i] = size - i;
    }

    printArray(arr, size);
    timSort(arr, size);
    printf("======\n");
    printArray(arr, size);
    delete arr;
}

For example with test(65); the exception is thrown.

Copy link
Contributor

github-actions bot commented May 6, 2024

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label May 6, 2024
Copy link
Contributor

Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale Author has not responded to the comments for over 2 weeks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant