Skip to content

BUG: fix reference counting bug in __array_interface__ implementation…#27266

Merged
charris merged 1 commit intonumpy:maintenance/2.1.xfrom
charris:backport-27249
Aug 22, 2024
Merged

BUG: fix reference counting bug in __array_interface__ implementation…#27266
charris merged 1 commit intonumpy:maintenance/2.1.xfrom
charris:backport-27249

Conversation

@charris
Copy link
Member

@charris charris commented Aug 22, 2024

Backport of #27249.

@seberg ran into this testing cunumeric: https://github.com/numpy/numpy/pull/26282/files#r1722321473.

Unfortunately there are no existing tests for this code path so we missed this breakage.

I tried writing an example that triggered this code path for a while this afternoon but was unable to.

  • BUG: fix reference counting bug in array_interface implementation

  • MAINT: only decref if the reference is valid

…numpy#27249)

* BUG: fix reference counting bug in __array_interface__ implementation

* MAINT: only decref if the reference is valid
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Aug 22, 2024
@charris charris added this to the 2.1.1 release milestone Aug 22, 2024
@charris charris merged commit 76d3e42 into numpy:maintenance/2.1.x Aug 22, 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