HERA-Team / aipy

Astronomical Interferometry in PYthon (AIPY)
http://pypi.python.org/pypi/aipy
Other
43 stars 29 forks source link

aipy.miriad.UV({filepath}) SegFaults for long filepaths #26

Closed SaulAryehKohn closed 6 years ago

SaulAryehKohn commented 6 years ago

This issue occurs for me if I'm trying to read a file more than 9 directories deep. I have yet to do systematic testing for a definitive string length.

pkgw commented 6 years ago

For me, 265 characters works, but 266 characters crashes:

$ python -c "import aipy.miriad; aipy.miriad.UV('z' * 266)"
Segmentation fault
pkgw commented 6 years ago

Probably related to the last of these statically-sized buffers:

$ git grep 'define MAXPATH'
aipy_src/_miriad/mir/dio.c:#define MAXPATH 1024
aipy_src/_miriad/mir/dirs.c:#define MAXPATH 128
aipy_src/_miriad/mir/hio.h:#define MAXPATH              256
pkgw commented 6 years ago

This should be fixed on master. I will work on rolling a new release but first I want to get the Travis integration actually working. And Travis is having problem right now.

pkgw commented 6 years ago

The fix should now be rolled out on conda-forge, in version 2.1.8.