Skip to content

Conversation

@mattip
Copy link
Member

@mattip mattip commented Oct 15, 2024

Fixes #27548 pragmatically, without diving into whether the compiler is correct or not. The changes should be harmless.

@charris charris added 36 - Build Build related PR 09 - Backport-Candidate PRs tagged should be backported labels Oct 15, 2024
@mattip
Copy link
Member Author

mattip commented Oct 15, 2024

CI is passing, BLAS errors are gone

if (result != ptr) {
PyTraceMalloc_Untrack(NPY_TRACE_DOMAIN, (npy_uintp)ptr);
}
PyTraceMalloc_Track(NPY_TRACE_DOMAIN, (npy_uintp)result, size);
Copy link
Member

Choose a reason for hiding this comment

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

Note that PyTraceMalloc_Track can return an error.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oy. It can return 0 for success, -1 for MemoryError, -2 for tracing disabled. Good catch.

@charris charris merged commit aab644b into numpy:main Oct 15, 2024
@charris
Copy link
Member

charris commented Oct 15, 2024

Thanks Matti.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

36 - Build Build related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: gcc version changed to 13 on BLAS CI runs

2 participants