Skip to content

Conversation

@ngoldbaum
Copy link
Member

It looks like this copy/paste error has been here for two years!

This was found in the nogil python build, which may find other reference counting bugs that a more forgiving GIL implementation wasn't bothered by.

@ngoldbaum ngoldbaum added the 09 - Backport-Candidate PRs tagged should be backported label Apr 1, 2024
@ngoldbaum
Copy link
Member Author

The nogil build stores the reference counts in a different spot in the PyObject struct and the reference counting logic is a bit more complicated, so it touches more places in memory than the old logic did. I think it was just dumb luck that we didn't seg fault with older python versions but now that python's reference counting internals changed we're finally getting in trouble for this bug.

@charris charris merged commit 3c9141b into numpy:main Apr 1, 2024
@charris
Copy link
Member

charris commented Apr 1, 2024

Thanks Nathan.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 2, 2024
@rgommers rgommers added this to the 2.1.0 release milestone Apr 2, 2024
@rgommers rgommers added the 39 - free-threading PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703) label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 39 - free-threading PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants