[SciPy-Dev] netcdf segfault

Warren Weckesser warren.weckesser@enthought....
Mon Jun 14 20:54:33 CDT 2010


Benjamin Root wrote:
> Hello,
>
> I was trying out the scipy.io.netcdf module in order to work on the 
> documentation and I came across a way to segfault out of python.  If 
> you open an existing netcdf file as read-only and then try to set a 
> scalar value using .assignValue for a 1-element netcdf_variable, the 
> program segfaults rather than raising an exception.
>
> Here is an example to go with a very small netcdf file as a test:
>
> from scipy.io <http://scipy.io> import netcdf
> f = netcdf.netcdf_file("testdata.netcdf", 'r')
> tval = f.variables['t']
> tval.assignValue(42)
> f.close()
>

Yup--I get a bus error on Mac OSX 10.5 with scipy trunk.

Warren

> Ben Root
> ------------------------------------------------------------------------
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>   



More information about the SciPy-Dev mailing list