Closed
Description
This issue is for the ticket:
http://projects.scipy.org/numpy/ticket/1588
Because the trac server is unreliable (frequently fails and I need to wait couple minutes for the database to be unlocked again --- see my email to the numpy list) and I need to keep track of my progress.
Summary of the problem
The following patch fixes it, but probably creates a leak sometimes:
diff --git a/numpy/core/src/multiarray/calculation.c b/numpy/core/src/multiarray/calculation.c
index 618a871..a360c4e 100644
--- a/numpy/core/src/multiarray/calculation.c
+++ b/numpy/core/src/multiarray/calculation.c
@@ -981,7 +981,7 @@ PyArray_Clip(PyArrayObject *self, PyObject *min, PyObject *max, PyArrayObject *o
}
else {
/* Side-effect of PyArray_FromAny */
- Py_DECREF(indescr);
+ //Py_DECREF(indescr);
}
/*
This code was first introduced by 9405a87 and the moved around later. There is no problem with this commit. The actual segfault was introduced between the commits 9a9f08e (good) and 64e30a7 (bad). Overall diff of these is: 9a9f08e...64e30a7
The problem might be in the changes in the ctors.c
file. At the moment, the correct fix (without leaks) is unclear. See the comments below for detailed analysis.
Metadata
Metadata
Assignees
Labels
No labels