[SciPy-Dev] netcdf segfault
Benjamin Root
ben.root at ou.edu
Mon Jun 14 21:43:55 EDT 2010
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 import netcdf
f = netcdf.netcdf_file("testdata.netcdf", 'r')
tval = f.variables['t']
tval.assignValue(42)
f.close()
Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100614/d2cfc30a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testdata.nc
Type: application/x-netcdf
Size: 84 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100614/d2cfc30a/attachment.nc>
More information about the SciPy-Dev
mailing list