Skip to content

BUG: Fix segmentation fault (#21436)#21473

Merged
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-21436
May 9, 2022
Merged

BUG: Fix segmentation fault (#21436)#21473
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-21436

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented May 8, 2022

Backport of #21436.

BUG: Fixed segmentation fault with numpy.ufunc.at when ufunc has
nontrivial signature, issue #21301.

Test cases were added in numpy/core/tests/test_ufunc.py to show that
when numpy.ufunc.at uses ufunc with nontrivial signature, then
TypeError should be raised, instead of a potential segmentation fault.
Test cases were also added to show that ufunc with trivial signature is
still valid and works as intended. See issue #21301.

Co-authored-by: Sebastian Berg sebastian@sipsolutions.net

* Fixed numpy#21301

* Fixed numpy#21436, better error message, organized test cases as requested

* Update numpy/core/src/umath/ufunc_object.c

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels May 8, 2022
@charris charris added this to the 1.22.4 release milestone May 8, 2022
@charris charris merged commit 8b09bba into numpy:maintenance/1.22.x May 9, 2022
@charris charris deleted the backport-21436 branch May 9, 2022 00:51
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