Skip to content

Commit

Permalink
Merge pull request #104 from saimn/fix-O3
Browse files Browse the repository at this point in the history
Fix dangling pointer leading to unexpected behavior with -O3
  • Loading branch information
mhvk committed Mar 29, 2023
2 parents e33ee55 + 43f4e4b commit c12b70e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2.0.0.4 (unreleased)
====================

- Fix dangling pointer leading to unexpected behavior with ``-O3``.

2.0.0.3 (2023-03-22)
====================

Expand Down
2 changes: 1 addition & 1 deletion erfa/ufunc.c.templ
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ static int ErfaUFuncTypeResolver(PyUFuncObject *ufunc,
{
int *types;
PyArray_Descr **dtypes;
int types_array[NPY_MAXARGS];

if (ufunc->userloops) {
Py_ssize_t unused_pos = 0;
Expand All @@ -577,7 +578,6 @@ static int ErfaUFuncTypeResolver(PyUFuncObject *ufunc,
}
else {
npy_intp j;
int types_array[NPY_MAXARGS];

if (ufunc->ntypes != 1) {
goto fail;
Expand Down

0 comments on commit c12b70e

Please sign in to comment.