Skip to content

BUG: Fix segfault in stringdtype lexsort #27993

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

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

charris
Copy link
Member

@charris charris commented Dec 13, 2024

Backport of #27992.

Fixes #27984

The segfault was happening because REFCHK is not a sufficient condition anymore (if it ever was) to assume the GIL is held. The fix is to use the check that was already happening to see if the dtype has NEEDS_PYAPI set.

Also adds tests for both stringdtype argsort and string lexsort.

  • BUG: do not assume REFCHK is the same as object in lexsort

  • TST: add tests for stringdtype argsort

  • TST: add tests for string lexsort

* BUG: do not assume REFCHK is the same as object in lexsort

* TST: add tests for stringdtype argsort

* TST: add tests for string lexsort
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Dec 13, 2024
@charris charris added this to the 2.2.1 release milestone Dec 13, 2024
@charris charris merged commit 42fd84c into numpy:maintenance/2.2.x Dec 13, 2024
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants