[Scipy-tickets] [SciPy] #1103: wrong call PyArg_ParseTuple in __quadpack.h causes memory errors

SciPy Trac scipy-tickets@scipy....
Thu Jan 28 08:41:10 CST 2010

#1103: wrong call PyArg_ParseTuple in __quadpack.h causes memory errors
 Reporter:  neinhues               |       Owner:  somebody
     Type:  defect                 |      Status:  new     
 Priority:  high                   |   Milestone:  0.8.0   
Component:  scipy.integrate        |     Version:  0.7.0   
 Keywords:  memory error quadpack  |  
 the __quadpack.h wrapping file calls PyArg_ParseTuple in various
 places. In some places this call is used to fill the variable
 limits. limits is declared as intp which finally evaluates to
 a machine-dependent variable, basically an integer which is able
 to hold a pointer on the given architecture.
 On many machines, this is a 64bit variable. Unfortunately,
 this variable is scanned in with identifier d instead of l in
 PyArg_ParseTuple, this entails memory errors later in the code.

 Suggestion: Please check your code for other bugs like this one and
 be especially careful with assuming a size of intp or npy_intp, since this
 is mapped to platform-dependent quantity

Ticket URL: <http://projects.scipy.org/scipy/ticket/1103>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list