Skip to content

BUG: Fix buffer export dtype references - #17753

Merged
seberg merged 1 commit into
numpy:masterfrom
seberg:valgrind-fixes
Nov 11, 2020
Merged

seberg merged 1 commit into
numpy:masterfrom
seberg:valgrind-fixes

Conversation

@seberg

@seberg seberg commented Nov 10, 2020

Copy link
Copy Markdown
Member

There is a small refcount bug introduced when fixing/improving the
buffer export code recently. This fixes it.


It would be fine to just merge this, I am running the test more, so I might find more small issues like this, but it might also take another day until I even look/get the test results...

@seberg

seberg commented Nov 10, 2020

Copy link
Copy Markdown
Member Author

This needs to be backported if the other buffer fixes get backported.

Comment thread numpy/core/src/multiarray/buffer.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

descr is not used until line 554. Could you move the descr = PyArray_DESCR(arr); Py_INCREF(descr); to there instead, or comment why it needs to stay at line 489?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, much better, thanks, definitely moved the wrong line around (moved it above now as well, so its at the end of the block in both branches).

@mattip

mattip commented Nov 11, 2020

Copy link
Copy Markdown
Member

Could you xref the other PRs that this relates to, so when/if backporting them this has less chance of being forgotten?

@seberg

seberg commented Nov 11, 2020

Copy link
Copy Markdown
Member Author

The PR where this was introduced is gh-17295.

There is a small refcount bug introduced when fixing/improving the
buffer export code recently. This fixes it.
@charris

charris commented Nov 11, 2020

Copy link
Copy Markdown
Member

This needs to be backported if the other buffer fixes get backported.

I'm planning on a 1.19.5 for the segfault fix, and maybe an OpenBLAS update if that gets sorted. 1.20.0 is close enough that I think lesser fixes can wait. How much importance do you put on the buffer fixes?

@seberg

seberg commented Nov 11, 2020

Copy link
Copy Markdown
Member Author

@charris true, I pinged the two people who opened the issue and regression that they addressed. Lets say, if they reply that it would help them soon enough, we backport :).

@seberg

seberg commented Nov 11, 2020

Copy link
Copy Markdown
Member Author

I assume you didn't merge because the test run didn't finish. It seems to be handing, so I will just ignore it. Only the refcheck tests were missing it appears, those are really unlikely to be related to anything here.

Thanks Matti.

@seberg
seberg merged commit bd6b1ec into numpy:master Nov 11, 2020
@seberg
seberg deleted the valgrind-fixes branch November 11, 2020 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants