Skip to content

BUG: Fix segfault in stringdtype lexsort#27993

Merged
charris merged 1 commit intonumpy:maintenance/2.2.xfrom
charris:backport-27992
Dec 13, 2024
Merged

BUG: Fix segfault in stringdtype lexsort#27993
charris merged 1 commit intonumpy:maintenance/2.2.xfrom
charris:backport-27992

Conversation

@charris
Copy link
Copy Markdown
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
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