Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: array_contains missing error check #15552

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

Closed
seberg opened this issue Feb 12, 2020 · 0 comments · Fixed by #15553
Closed

BUG: array_contains missing error check #15552

seberg opened this issue Feb 12, 2020 · 0 comments · Fixed by #15553
Labels
00 - Bug Priority: high High priority, also add milestones for urgent issues

Comments

@seberg
Copy link
Member

seberg commented Feb 12, 2020

Contains misses the error check for any failing:

    any = PyArray_Any((PyArrayObject *)res, NPY_MAXDIMS, NULL);
    Py_DECREF(res);
    ret = PyObject_IsTrue(any);
    Py_DECREF(any);

This leads to a segfault with objects that do not have a truthiness defined, as seen in pandas:
pandas-dev/pandas#31922

@seberg seberg added 00 - Bug 09 - Backport-Candidate PRs tagged should be backported Priority: high High priority, also add milestones for urgent issues labels Feb 12, 2020
seberg pushed a commit that referenced this issue Feb 13, 2020
charris pushed a commit to charris/numpy that referenced this issue Mar 2, 2020
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug Priority: high High priority, also add milestones for urgent issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants