Skip to content

BUG: Fix misplaced return#20980

Closed
seberg wants to merge 1 commit intonumpy:mainfrom
seberg:fix-cast-error-path
Closed

BUG: Fix misplaced return#20980
seberg wants to merge 1 commit intonumpy:mainfrom
seberg:fix-cast-error-path

Conversation

@seberg
Copy link
Copy Markdown
Member

@seberg seberg commented Feb 2, 2022

This lead to crashes when casting failed with an error already set.
Internally to NumPy, this is exceedingly rare (maybe impossible aside
from catastrophic failures, such as out-of-memory).


No test, because I am pretty sure the only way to hit this within NumPy proper is through impossible errors.

(On the other hand the Unit dtype runs into this very quickly.)

This lead to crashes when casting failed with an error already set.
Internally to NumPy, this is exceedingly rare (maybe impossible aside
from catastrophic failures, such as out-of-memory).
@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Feb 2, 2022
@seberg
Copy link
Copy Markdown
Member Author

seberg commented Feb 2, 2022

Could backport, although it should be impossible to trigger in practice...

@seberg
Copy link
Copy Markdown
Member Author

seberg commented Feb 2, 2022

Nevermind, merged as part of the other PR. This is backportable, though not high priority.

@seberg seberg closed this Feb 2, 2022
@charris charris added 09 - Backport-Candidate PRs tagged should be backported and removed 09 - Backport-Candidate PRs tagged should be backported labels Feb 2, 2022
charris added a commit to charris/numpy that referenced this pull request Feb 2, 2022
Backport of numpy#20980.

This lead to crashes when casting failed with an error already set.
Internally to NumPy, this is exceedingly rare (maybe impossible aside
from catastrophic failures, such as out-of-memory).
@charris
Copy link
Copy Markdown
Member

charris commented Feb 2, 2022

I went ahead and backported this.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Feb 2, 2022
@seberg seberg deleted the fix-cast-error-path branch February 2, 2022 23:53
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.

2 participants