Skip to content

BUG: fix NPY_cast_info error handling in choose - #24484

Merged
charris merged 1 commit into
numpy:mainfrom
ngoldbaum:choose-fix
Aug 22, 2023
Merged

charris merged 1 commit into
numpy:mainfrom
ngoldbaum:choose-fix

Conversation

@ngoldbaum

Copy link
Copy Markdown
Member

Closes #24459.

cast_info needs to be declared before the first goto fail, otherwise the xfree in the fail block receives uninitialized data.

@tylerjereddy sorry I missed this when we were reviewing #24188, going to try to keep this pattern in mind when looking at code that uses the cast C API in the future.

@tylerjereddy tylerjereddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah that makes sense, LGTM if CI passes.

@charris
charris merged commit 0450bc4 into numpy:main Aug 22, 2023
@charris

charris commented Aug 22, 2023

Copy link
Copy Markdown
Member

Thanks Nathan.

@ngoldbaum ngoldbaum added the 09 - Backport-Candidate PRs tagged should be backported label Aug 23, 2023
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 24, 2023
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.

BUG: Segfault in trimesh's test suite with numpy 1.26.0b1

3 participants