Skip to content

BUG: PyObject_IsTrue and PyObject_Not error handling in setflags #24178

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

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

ngoldbaum
Copy link
Member

@ngoldbaum ngoldbaum commented Jul 13, 2023

Fixes an issue revealed by the fuzzing in #24175. If any of the arguments are ndarrays or any other type that raises an error when trying to figure out its truthiness, the interpreter will get into an inconsistent state.

@seberg seberg merged commit a6a9a9a into numpy:main Jul 14, 2023
@seberg
Copy link
Member

seberg commented Jul 14, 2023

Seeing this, can't help but try to clean this up a bit; but lets do that as a follow-up.

@seberg
Copy link
Member

seberg commented Jul 14, 2023

Probably need a OptionalBoolConverter to make it nice; which is trivial of course, but...

@charris
Copy link
Member

charris commented Jul 14, 2023

Does this need a backport?

@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Jul 14, 2023
@seberg
Copy link
Member

seberg commented Jul 14, 2023

Does this need a backport?

Good point, it's a safe bugfix, so sure!

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